문제

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)
...
도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top