Is there a way to repeat some tests for a week by using testNG framework?

StackOverflow https://stackoverflow.com/questions/22533102

  •  18-06-2023
  •  | 
  •  

سؤال

I need to run a test for a week. I tried several ways. 1. Use factory to add test. All cases run after the factory method finished. So I could not judge how many tests to add.
2. Changed TestNG class, rewrite some methods. Only works when I need to repeat all tests.

Is there any good way to implement that?

هل كانت مفيدة؟

المحلول

Have a thought of change both XmlSuite and testNG class. Add isRepeat and time2Repeat properites for XMLSuite and change testNG method runSuitesSequentially to support repeat running. Will have a try later.

The solution might work, but feels like a hack. If anyone could provide more decent way, please provide your thoughts.

Thanks!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top