Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TestCafe - How can I run multiple fixtures (one after the other, not concurrent)?

I have multiple fixtures (interaction between a website and a hybrid app) and I would like to have a test suite run (Smoke test, regression test ...) but I'm not sure how to do it.

This is how my tests look like:

enter image description here

What I want to do is run all tests (eg. CreatePollAndCloseIt.js, CreatePollPinAndDelete.js, CreateStreamAssertions.js and so on until the last one VotePollWhitelabel ) and get a report after.

Thank you!

like image 856
MikeT Avatar asked Nov 23 '18 11:11

MikeT


1 Answers

You can run all your tests by specifying the parent folder of your test file. For example you can run all your Mobile Tests with the command: testcafe chrome <path>/MobileTests

Also it's possible to reorganize your folder structure, eg:

 - Mobile
     - Smoke
     - Regression

In this case you can run your test suites via following commands:

  • testcafe chrome <path>/Mobile - for all tests
  • testcafe chrome <path>/Mobile/Smoke - only smoke
  • testcafe chrome <path>/Mobile/Regression - only regression

Another way to organize the test-suites is using the testing metadata. Please refer to the following articles to get the details:

  • Specifying Testing Metadata
  • Filtering by Testing Metadata
like image 76
Alex Kamaev Avatar answered Sep 25 '22 15:09

Alex Kamaev