Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to best setup the testing suite #157

Open
tertek opened this issue May 3, 2023 · 1 comment
Open

How to best setup the testing suite #157

tertek opened this issue May 3, 2023 · 1 comment

Comments

@tertek
Copy link

tertek commented May 3, 2023

I am currently trying to find the best setup variant and might need your help to resolve some questions/issues

  1. REDCap Instance on Docker, Cypress on host (Win)
    This works fine, only if I can make "redcap_source_path" accessible. As far as I know there is no way to access it directly from within docker so I have to duplicate it at a place where Cypress can access it on the host. Otherwise, the database cannot be seeded (Please note that their is no warning about failed seeds).

  2. REDCap and Cypress on host (Win)
    This works without problems, but is not very portable.

  3. REDCap and Cypress on Docker
    Using official Cypress Docker Image it is possible to extend REDCap Docker Instances by them. Basically it works, but new issues arise when trying to run docker / mysql from within Cypress:included container. Either the container has to be extended by mysql cli or there is another way to call the container directy as mysql command.

@aldefouw I would be glad if you could share your approach and how you resolve the issues. Please also tell me if I missed something.

@tertek tertek changed the title How to best setup the testing suite. How to best setup the testing suite May 3, 2023
@aldefouw
Copy link
Owner

@tertek - I think the CircleCI YML file we use for build tests might clear up confusion:
https://github.com/aldefouw/redcap_cypress/blob/v11.1.5/.circleci/config.yml

You can see that we build the virtual machine image via Docker, map the REDCap source code into the container via Docker volume (note: the source repository is private because it would be license violation to make it public - you must download the source code yourself), and then configure the Cypress environment.

Basically, I recommend running Cypress natively on your machine and keeping a separate source code folder that is mapped in by a Docker container. The source code is necessary for the database configuration pieces.

Also, just for verification ... you are trying to run the tests against a Test Instance, right? That's very important. A handful of folks have thought they can run this against a production instance - please don't do that. Only run against a "throw away" instance where you don't care about the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants