How to make sure TestNG runs methods on test classes in succession instead of interleaved?

后端 未结 7 2420
南笙
南笙 2020-12-14 03:41

The situation and the problem

I have several test classes, each with several test methods. All tests use the same test database in the background. Each test class

相关标签:
7条回答
  • 2020-12-14 04:16

    Use method interceptors (=write and enable a custom one) to control the ordering.

    Also, each class might use its own database sandbox: wrapping each test class into a transaction might possibly help.

    Having individual suffix for tables/db set up for each class would even let your test methods run in parallel (I guess the first two options would not).

    0 讨论(0)
提交回复
热议问题