Test long-running tasks?

15 views
Skip to first unread message

craig buchanan

unread,
Feb 12, 2018, 9:02:59 AM2/12/18
to Pester

I'm in the process of creating a PowerShell library to interact with SAP's REST SDKs that control interaction with its various components. The goal is to be able to automate report (Crystal or webi) deployment and migration between environments (development -> UAT -> production).


In addition, to using Pester to test the library, I'd like to use Pester to test the workflow automation that the library will support (similar idea: Test Business Rules with Pester ).


The workflow tests might include:

  • report uses the correct database connection
  • database connection is functional
  • lists-of-value are populated
  • report contains the expected parameters
  • report returns the correct data
  • promotion task completed without error

One of the challenges is the some of the tests might take some time to complete (e.g. 'the report returns the correct data') and I don't want those tests to block the completion of other tests.  Is there a recommended way to test a task that might take 5-10 minutes to complete?


Dave Wyatt

unread,
Feb 12, 2018, 9:09:06 AM2/12/18
to craig buchanan, Pester
There aren't any timeouts in to Pester.  No reason you can't test a long-running task.

--
You received this message because you are subscribed to the Google Groups "Pester" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pester+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wojciech Sciesinski

unread,
Feb 12, 2018, 3:27:39 PM2/12/18
to Pester
Hi Craig!

You can be interested to follow the issue Support `-Timeout` for test cases #983.

Wojciech Sciesinski
Reply all
Reply to author
Forward
0 new messages