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 run functional tests in build script? #39
Comments
@janhesters You have to install the missing dependency yourself. You can add commands to install chrome dependencies in prebuild. |
@garyleefight Do you know which dependencies and how to install them exactly? I can't find how to install chrome for the Amplify console. I only found this, which tackles docker. And these Google docs are for Travis CI. As far as I can tell, there is no |
@garyleefight Thank you for your help. Managed to solve the install problem by adding
to my build settings. My question is now: How can I run yarn start so that the tests can pass? Currently the functional tests run, but fail, because no server is running. |
@janhesters You can use https://stackoverflow.com/questions/30950032/how-can-i-run-multiple-npm-scripts-in-parallel concurrently package to run yarn start and your test command in parallel. Hope it works for you. Besides, AWS Amplify Console baked Cypress test in the default image. You can choose it as an alternative selection. Thanks, |
Thank you I will try concurrently. I also found the
Really? I didn't know that and could'n find anything in the docs about this. Do Cypress tests "just work"? Or is there extra configuration needed. |
I got it working by adding a delay to launch the app. "functional-tests": "testcafe 'chrome:headless' src/functional-tests/ --app 'yarn start' --app-init-delay 4000", |
@janhesters Do you know the npm lib start-server-and-test (no need to add delay) ? |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
** Please describe which feature you have a question about? **
I'm trying to run functional tests with TestCafe when building. Here are my build settings:
And here is how the
"validate"
script looks like:But this throws the error:
How can I add Chrome to the Amplify console, or run functional tests with it?
** Provide additional details**
The text was updated successfully, but these errors were encountered: