How can I specify JUnit test dependencies?

后端 未结 6 1132
南方客
南方客 2020-12-23 09:37

Our toolkit has over 15000 JUnit tests, and many tests are known to fail if some other test fails. For example, if the method X.foo() uses functionality from Y.bar() and YTe

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-23 09:49

    In behavior driven design library jBehave there's a keyword GivenScenarios which imports a list of scenarios that are run before the main scenario. This gives an opportunity to define dependencies and have one point of failure. jBehave's logging will tell you if test fails in dependencies or main body section.

提交回复
热议问题