HaveComputerWillCode.Com

Welcome!
Life is a Non-Deterministic Finite State Automata
Automation ? (*pGeekiness)++ : Code /eneration;

May 6, 2012

Pronto v1.5 Released (Productivity Tool for Automating MTM Test Cases)

Filed under: ALM,Programming,Testing — Tags: , , , , , , , — admin @ 6:12 am

Pronto lets you create test stubs (including data binding and documentation) for your manual MTM Test Cases in C# or VB.Net by dragging those test cases onto your source file. You can then use Pronto’s Bulk Associated Automation Assistant to associate many of your test methods with your MTM test cases in one go. Uses might include: automating acceptance tests or creating Keyword/Action Word Frameworks. The application can be downloaded directly from Visual Studio Gallery here.

Changes to v1.5:

• All fragment generators are now freely editable T4 text files
• Create new generators and customize the fragments easily (docs and samples included)
• Fixed a few bugs

After downloading, Unblocking the file (right click -> Properties), installing the VSIX and restarting Visual Studio, ensure that the Pronto window is visible:

Assuming you already have a WorkItem query in Team Explorer that returns Test Cases, just Drag and Drop that query onto the Pronto window to get a list of Test Cases:

To create your method stubs and help with documentation, either Drag ‘n’ Drop or Right Click/Copy the Test Cases and Shared Steps and paste directly into your Unit Test:

Notice how the method stub, data binding parameters, test steps and title are all generated for you automatically (this is customizable).

After building your solution manually, open up the Bulk Associated Automation Assistant (the “Sheep” icon). It will discover your tests and correlate the MTM Test Case ID with the WorkItem Id on your test method:

Now you can optionally associate them all in one go without leaving VS2010.

This application has been tested on Visual Studio 2010 Professional (first release) and Visual Studio 2010 Ultimate (SP1, FP2, Rollups). Providing your process template integrates with MTM from a Test Automation perpsective – ie: supports ‘Associated Automation’, has an ‘Automated’ automation status and contains ‘Shared Steps’ and ‘Test Case’ template types, in theory, depending on the alignment of the stars, the phase of the moon and the direction of the wind, Pronto should just work.

Enjoy!

Grey Ham

November 6, 2011

User Account Control Automation Assistant [UacAA] released

Filed under: Programming,Testing — Tags: , , , , , , , , — admin @ 8:14 am

I have released the first version of User Account Control Automation Assistant [UacAA] that can be downloaded here:

Automate the dismissal of UAC from any scripting or .Net programming language

Key features include:

  • Programmatically automate the User Account Control [UAC] elevation and credential dialog boxes on the standard or secure desktop on Vista and Windows 7 (x64/x86)
  • Requires no tweaking to your environment, no digital certificates, no modifications to your UAC settings and no application manifest modifications. Install and go!
  • Can be driven from any programming language or scripting environment – including C#, VBScript, Perl, PowerShell or (if you’re really hard) C++. Extensive samples are provided in C# and VBScript.
  • Dialogs can be automated by any user at any privelege level – ideal where elevated applications need to be launched as part of a test.

UacAA might be handy for:

  • Launching elevated applications as part of your automated test suite to modify the environment between tests.
  • Integration / smoke testing where UI automation is not a primary objective but where User Account Control automation is required.
  • Testing your application behaves correctly under Uac!
  • Running your integration tests on an isolated P2V-SOE production clone without making any changes to the environment whatsoever.
  • Reducing the number of snapshots and virtual machine baselines that need to be managed.
  • Automating security-related tests that were previously manual in nature.

How it works:

  • Set an expectation that a User Account Control dialog box is to be displayed and indicate what to do when it is – such as enter credentials and Confirm it.
  • Do something that requires elevation such as launching an application.
  • In the background, UacAA is monitoring for the presence of the UAC dialog – if it appears, the dialog will be automated according to your expectation so that your application can continue.
  • Optionally ask UacAA what it has just done and the kind of dialog that was displayed (elevation vs credentials) and the desktop on which it appeared (standard or secure)

Known limitations:

  • This version will automate only one dialog per expectation – it is currently not possible to say "enter these credentials and select Confirm whenever UAC dialogs appear from now on"

Microsoft has provided a way of automating User Account Control by leveraging its UI Automation technologies – but this involves UAC modifications, installation of digital certificates and an application with UIAccess rights for UI automation. This level of security is clearly required in production environments where trust (obtained via the certificate) is paramount because otherwise we would back in the days of the “shatter attack” (UAC appears on the Secure Desktop to prevent exactly that kind of attack!).

In test environments – where free text passwords tend to lay around with wanton abandon :-) – you just want the darn dialog to go away but to otherwise retain UAC.

UacAA lets you do this.

Where the Microsoft supported way is convenient, it should be adopted. Where it is inconvenient, or where perhaps integration testing is the objective and no infrastructure or applications are around to facilitate UI automation easily, UacAA might fit the bill. UacAA should only be used on test environments and never installed on server or systems where arbitrary content from the Internet can be executed.

UacAA must absolutely not be used as a hackey-wackey way of executing scripts that require elevation on desktop systems!

Powered by WordPress