How to make TestNG wait for my test to complete before shutting it down

前端 未结 1 486
南旧
南旧 2020-12-21 16:10

I have a slightly complicated test structure so bear with me,

I have a series of testng test cases and during each I collect some data about the test( not directly b

相关标签:
1条回答
  • 2020-12-21 16:21

    You can in general do one of the following:
    1) By making the main Thread wait for another Thread using

    Thread.join();
    

    2) Making the another Thread as Non Daemon or a user thread:link

    Thread.setDaemon(false);
    

    The Java Virtual Machine exits when the only threads running are all daemon threads.This method must be called before the thread is started.

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