Autotesting with PowerShell

We have started working on automating PowerGUI testing.

While this will not bring immediate benefit such as new features, etc. this should make our releases starting with 1.0.6 and beyond much more stable and bug-free. With our current schedule of new releases every 2-3 weeks manual testing simply cannot provide for high quality and allow many changes between releases.

We had a few options on the software to use to automate tests and decided to go with… PowerShell scripts!

Here’s what we’ve done:

1. Created a dll proving a wrapper which gives us things like global variables, STA threading model (we need this for the web browser control on the welcome page), initialization in a separate thread (so we have both PowerGUI and scripts running in separate threads), etc.

2. Created a PowerShell autotest script which basically runs all tests one by one and catches and reports error messages.

3. For each individual tests we create separate ps1 files doing just one of the tests. For example, this script “clicks” all nodes in PowerGUI left-hand tree without waiting them to complete.

P.S. This last test by the way already caught us a bug in 1.0.5 caused by our changes to asynchronous behavior. This fast click-through sometimes results in an error message being displayed. This is not fatal and the workaround is to simply click Refresh but nevertheless this is an issue which we now have covered in our tests and which will for sure go away forever in our next releases.

You can read more about Lightweight Testing with Windows PowerShell in May edition of MSDN Magazine.

Tags: , , , , , , ,

3 Responses to “Autotesting with PowerShell”


  1. 1 Tahir March 22, 2016 at 6:00 pm

    Hi Dmitry,

    Ive been reading your blogs with great interest.

    Just wondering if your powershell automation is being executed from within HP ALM?

    what are your thoughts on this?

    My company has a need for powershell auto scripts to be executed from HP ALM with results being stored there too.

    any suggestions or pointers would be appreciated.

    Thanks

    Tahir


  1. 1 PowerGUI 1.0.6 released! « Dmitry’s PowerBlog Trackback on May 18, 2007 at 9:24 am
  2. 2 Automated Software Testing with PowerShell and PowerGUI « Dmitry’s PowerBlog: PowerShell and beyond Trackback on August 29, 2007 at 3:45 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




My Recent Tweets

Legal

The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer - WSO2 or anyone else for that matter. All trademarks acknowledged.

© 2007-2014 Dmitry Sotnikov

May 2007
M T W T F S S
« Apr   Jun »
 123456
78910111213
14151617181920
21222324252627
28293031  

%d bloggers like this: