Question

I have a large set of tests that I would like to be able to filter so that I can run specific tests. I am currently using JBehave with JUnit

If I have three sets of criteria priority with values from 1 to 5 colours with possible values of red, green, blue and yellow day with possible values of the days of the week

If I set up a 'filter' of priority == 1, colour == blue, day == Tuesday then I will get all of the tests where the criteria has either a priority == 1 OR colour == blue OR day == Tuesday. This is whether I use JUnit, TestNG or the JBehave Meta filters.

What I actually want are only the tests where priority == 1 AND colour == blue AND day == Tuesday.

Is there any framework that I can use to be able to do this? In the application I will have about 8 different sets of criteria to and each criteria will have a maximum of about 4 values.

Was it helpful?

Solution

You can use TestNG with groups and BeanShell to implement the logic. Details here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top