Home
Releases
Discussions
Issue Tracker
Source Code
Stats
People
License
RSS RSS Feed
Search Wiki:
PowerShell Scripts for Testing
Microsoft PowerShell is Microsoft's new scripting language and shell first implemented and released in late 2006 in preparation for the Exchange Server 2007 release. Its initial audience seems to be systems administrators, and many of the built-in cmdlets (command-lets) focus on making calls to infrastructure-oriented features such as Windows Management Instrumentation (WMI) and Active Directory (ADSI).

This project envisions an expanded purpose for PowerShell - testing. With simple supporting functions, we believe that PowerShell could be used for application testing and infrastructure testing. In fact, it is well-suited for such purposes given its support for control structures, exception handling, and access to .NET system classes.

All that is missing is a set of xUnit-style assert* functions. Given this library, developers that are used to NUnit or other testing tools that use the assert* metaphor can adapt quickly to writing tests in PowerShell. Some of the testing that we envision this could be used for:

  • GUI bypass testing - write workflow scenarios that are either data- or keyword-driven that call your business services layer directly
  • Behaviour Driven Development - write test cases in the 'given-when-then' style of writing functional test scripts
  • GUI testing - adapt the workflow scenarios from GUI bypass testing to your GUI - PowerShell can access .NET classes from both custom or system namespaces
  • deployment testing - create a script that verifies your release went as expected - check running processes, services, database metadata, database content, application file versions, configuration file contents, etc.
  • infrastructure testing - create a script that verifies the hardware, operating system, running services, running processes, etc. match your expectations
  • ... (the list goes on and on)

There is a companion blog for PSExpect here: http://testfirst.spaces.live.com

Project Charter User Guide Data-driven Testing Using Excel
Last edited Jan 8 at 9:00 PM  by ageras, version 8
Comments
wadetime wrote  May 20 at 12:12 PM  
that's nice

Updating...