Archive for the 'autotest' Category

PowerShell for acceptance testing

PowerShell with its .NET integration and more and more products/platforms shipping with native PowerShell cmdlets is a great tool for automated testing. (I even posted a sample PowerPack helping organize tests in PowerGUI a few years ago.)

We at Quest Software are using PowerShell a lot for our software development and testing. Our SharePoint management team is on the cutting edge and extended acceptance testing Fitnesse framework to PowerShell.

But wait, now it gets really cool: they have open-sourced the PowerShell Fitnesse framework – PowerSlim at codeplex for everyone to download, use, modify, and update!

Read more about PowerSlim in Konstantin’s blog here.

Autotesting AD cmdlets

Looks like the AD cmdlets team has decided to start using PowerGUI autotesting pack to test their releases.

They are basically suggesting the community to add our own tests to the set of the ones they will make sure to run before each and every release. This way you can ensure that whatever the team does the functionality you need always works.

I also think that since AD cmdlets are absolutely free this is a good chance to give back and help the team make the product better for all of us.

I have already posted a couple of scripts to the thread: one just creating a user account, checking success and then deleting it, the other – adding a user and a group to another group. (The latter test by the way does find a bug in 1.0.4.)

As a nice side-effect you can use these sample scripts as examples of scripting AD cmdlets, and as sample PowerShell automated software tests.

Tags: , , , , , , , , ,

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: , , , , , , ,

My Recent Tweets


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 2022

%d bloggers like this: