Selenium + JUnit: test order/flow?

前端 未结 5 804
感动是毒
感动是毒 2021-02-03 10:08

I am using Selenium to test my java web app\'s html pages (JSPs actually). My web app requires a flow to access each pages (it is a small online game web app), as in: to get to

5条回答
  •  抹茶落季
    2021-02-03 10:37

    JUnit is not really designed for flow/integration level testing.

    For that situation, I've designed my own Runner that guaranties the order the tests are run and also reuses the same instance of the test class for all test so you can pass values for a step to another.

    (Yes, it's a bad practice for unit tests - but we're not talking about unit tests there even if they run with jUnit).

    Using another tool (cucumber, fitnesse, TestNG, whatever) is also a good solution - but there is such thing as too many test tools in a project.

提交回复
热议问题