0

Are there any other way to run test cases individually other than using --testcase flag ? also are there any to run 2 single test case from 2 different test suites?

For example:

Test Suite 1

  • Test Case A
  • Test Case B

Test Suite 2

  • Test Case C
  • Test Case D

and say i want to run only test case A and C (not B and/or D), are there any way for me to achieve this on Nightwatch ?

1
  • Query-1: Using of tag is also a very useful practice while working with nightwatch. You can use @tags to run the testcases without using --testcase for example $nightwatch --tag <tagname>
  • Query-2: No, There is no standard way to run 2 single test case from 2 different test suites as this is not a standard practice. If you think that those cases are relative and should be run at single then you should place them in one file. Or you can create a calling index.js file in which you can call the test case as a function and pass browser as parameters to function (The test cases which you want to run). In that case you have to run index.js like $nightwatch index.js

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.