I have multiple integration test that starts a mock socket server, send message to it and verify the response. All of these tests starts the same mock server. I want to group these tests and achieve following execution flow.
I also want to run any of these test on individual bases ie running only one test.
Can anyone please guide me how I can structure my test classes?
Thanks
you have at least to ways. if you use maven you can assign server startup to pre-integration-test and server shutdown to post-integration-test phase. it's usually done with jetty/tomcat. other way is to use testng and use beforeGroup/beforeClass and afterGroup/afterClass to startup and shutdown your server
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.