423,818 Members | 2,266 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,818 IT Pros & Developers. It's quick & easy.

How to wait in automation Test while service does the job?

P: 1
I have a windows service which I am trying to automate using simple xunit and c#. I want know what would be the best way to wait within Test while service is processing the record. Currently, I am using
While(record == null || record.Status != "Complete")
{
Thread.sleep(5000)//sleep 5 secs
}
//Assert record once its processed.

What is the best way to achieve this considering multiple tests will be run?
2 Weeks Ago #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.