Question

I am new to junit concept.

Can anyone explain to me clearly what the Data Driven concept is?

And another other question would be if we can write two RunWith-annotated methods in one junit class.

@RunWith(Parameterized.class)
...

and

@RunWith(Theories.class)
...
Was it helpful?

Solution

http://support.smartbear.com/viewarticle/29139/

Explains data driven concept in detail. Mainly it invlolves in creating different sets of data to test the code in short. Mainly used to write automated test cases where a certain piece of code is always run through different types of test data and tested for desired output.

And for the second question I don't think multiple @Runwith method makes sense, as it is a directive for junit to load proper runner to execute testcases instead of default runner built into the Junit. I haven't tried it also. Hope this offers some answer to your question.

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