java - Passing information between test methods in a junit testcase -


Currently I am creating a TestCase for a workflow and the workflow has different steps. The results are important, because the second step is required to know the value of the execution of stage 1.

TestCaseWorkFlow1 Expands TestCase {Private Static String Results OfStep1 = Null; Public Zero Test Phase 1 () {if (failed) {resultOfStep1 = "failed"; }} Public Zero Test Phase 2 () (If (resultOfStep1! = Null) {// First test failed} Else {}}

}

Currently We are using static variables to pass information between testmethods.

What is the best solution for this? Scenario?

Please help.

Thanks J

This is not like a unit test for me, it's okay, but JUnit The best tool can not be you

  • Pass the state through a fixed variable
  • Use it to validate that step.
  • One does the job .

  • Comments

    Popular posts from this blog

    windows - Heroku throws SQLITE3 Read only exception -

    lex - Building a lexical Analyzer in Java -

    python - rename keys in a dictionary -