6

Is it possible to run a specific test within my selenium side runner test suite? For example, within a test suite, my first test logs me into a website, then the other tests, test specific areas of the website. Each of these tests first inherit the login test to auth the "user" when running the tests. But when I run the suite, it runs the tests in order, so it will first run the login test, then rerun the login test within my other tests. Hope this makes sense. So essentially i want to be able to specify which tests to run within my test suite. Thanks in advance

dsj
  • 61
  • 2
  • One option is to add or remove them from the suite or make a different one... but I'm a bit confused about your problem. If you need to handle logging in after youre already logged in, try an `open` command to your logout api at the start of the test – Marc Sloth Eastman Aug 12 '19 at 16:12

2 Answers2

0

You may use the filter to run tests that have a common name:

Filter tests
You also have the option to run a targeted subset of your tests with the --filter 
target command flag (where target is a regular expression value). Test names that 
contain the given search criteria will be the only ones run.

[example] selenium-side-runner --filter smoke
Daniel Connelly
  • 206
  • 2
  • 10
  • 2
    For now --filter option works on suite level, so it could filter suites, but not the tests. Yeah, documentation is confusing here. – Aleksei Petrov Dec 17 '20 at 13:23
0

Is there a similar method for executing test suites instead of single tests?

EDIT: I found that in the documentation and here "test" actually is used in the sense of "test suite"

Gorilla
  • 1
  • 3
  • 1
    If you have a new question, please ask it by clicking the [Ask Question](https://stackoverflow.com/questions/ask) button. Include a link to this question if it helps provide context. - [From Review](/review/late-answers/34556130) – Aaron Meese Jun 22 '23 at 13:29