Open aurelien-reeves opened 6 years ago
+1 for this. I am using Cypress for E2E testing and it is very quick compared with Selenium.
+1 for this too
+1 for adding Cypress integration.
+1 Will love to see cypress integration.
+1 !
+1
Just wondering: Cypress ~understands ~Jasmine format~ is built on top of Mocha, what's prevents you guys from using this format?
+1
I have a question. What do people expect from a cypress integration?
I've been using cypress in tests generated by hiptest-publisher
and all works fine. Here's my config file I use while generating tests:
token = 'your-project-token-here'
language = 'javascript'
framework = 'mocha'
output_directory = 'cypress/integration'
with_folders = 'true'
push_format = 'junit'
And cypress.json
file looks like this:
{
"baseUrl": "https://www.example.com",
"ignoreTestFiles": "actionwords*",
"reporter": "junit",
"reporterOptions": {
"mochaFile": "cypress/reports/report-[hash].xml"
}
}
You may want to ignore generated test files. My .gitignore
file looks like this:
# generated test artefacts
cypress/integration
!cypress/integration/actionwords*
cypress/screenshots
cypress/reports
I use Makefile
to run the tasks in my project, here it is:
generate-actionwords:
hiptest-publisher --config-file=ht.config --actionwords-only
erase-tests:
rm -rf cypress/reports cypress/integration/**/*test.js
ci:
npx cypress run
ci-with-hiptest:
- make erase-tests
- hiptest-publisher -c ht.config --only=tests --test-run-id=${test-run-id}
- make ci
- hiptest-publisher -c ht.config --push="cypress/reports/*.xml" --test-run-id=${test-run-id}
And that's it, the below task works like a charm ✅
make ci-with-hiptest test-run-id=12345
Feel free to ask in case of any questions 🙃
@kopacki when you run the tests it updates the test on your hiptest dashboard?
Yes, this line handles it:
hiptest-publisher -c ht.config --push="cypress/reports/*.xml" --test-run-id=${test-run-id}
@kopacki can you explain how this works. if i use the hiptest-publisher -c ht.config --only=tests --test-run-id=${test-run-id} command, i will just get an testfile that has Todo implement action.
This mean cypress cant run it because its empty. And since you delete everything in your erase-tests step i dont understand how this will work.
+1
Hello again,
first you have to run generate- actionwords
command which downloads the actionwords only.
+1 for Cypress integration!
hiptest-publisher --config-file=ht.config --actionwords-only
I have a couple questions regarding this integration with Cypress:
why is it necessary to erase the cypress/reports
cypress/integration/**/*test.js
tests between generating the action words and exporting the test runs from Hiptest?
After generating action words from Hiptest to the javascript/mocha format, should'nt the execution of these scripts be async? Since the dev must implement the body of the generated functions first before running npx cypress run
?
Thanks @kopacki
that's me out :( I've no idea why a product such as HipTest should be tied to any kind of test runner - at the most to the Cucumber framework yes. I don't get it.
@tk-o how do you structure your test cases? i guess you use action words in order to be able to use hiptest uploader? is it possible to use it without actionwords?
@tk-o how do you structure your test cases? i guess you use action words in order to be able to use hiptest uploader? is it possible to use it without actionwords?
It's been a while since the last time I used Hiptest, so unfortunately, I won't be able to answer this question. Back it the day, I think the actionwords were required, not sure what's been like recently.
Add support for Javascript End to End testing framework Cypress website: https://www.cypress.io/