Skip to main content

Posts

Showing posts with the label Test Automation

Code share - Test Run Summary Table with collapsible point of failure details

Video is here . Code is here: File: myscript1.js function repeatTest($scope) {   $scope.tests = [     {testName: "Test1", overallResult: "Pass", firstError: "-", lastError: "-"},     {testName: "Test2", overallResult: "Fail", firstError: "Page not found", lastError: "Page not found"},     {testName: "Test3", overallResult: "Fail", firstError: "Could not select value in combobox - EmpAgeRange", lastError: "Could not find editbox - EmpAddressLine2"}   ]; } File: index.html <!DOCTYPE html> <html>   <head>     <script src="http://code.angularjs.org/1.2.0-rc.2/angular.js"></script>     <link rel="stylesheet" href="style.css" />     <script src="myscript1.js"></script>   </head>   <body ng-app="">     <h1>Test Run Summary</h1...

Excel Automation and a palatable QTP Suite

  Excel automation and VBScript can be used to create a test suite that can control the run sequence of QTP scripts and present a Summary report of the automation run cycle. Its simple enough to double-click an icon and the VBScript program will create an excel sheet, populated with all the scripts from a Test folder. Here’s the folder structure: Click here to get the files.   The CreateSuite.vbs program creates an excel sheet .. .. and populates it with all the QTP scripts from the Tests folder (folder hierarchy within the Tests folder does not matter, a valid script folder will be fetched). Here’s how the excel sheet looks after running the CreateSuite program: This Test Suite has been created in the TestSuite folder, as the Suite.xls file: Once the list of tests is available, one can choose to configure a subset of the listed tests to be run, like in the case below, we turn off the fourth test: Now that the list of tests to be run is r...

Fresh brew with NUnit for Selenium over a cuppa VS2010 Express’o

  Selenese coffee beans 1) A recorded Selenium script for a simple scenario of googling for the term Tomato. This recording should have been saved as an export in C# format. 2) VS2010 express editors – for C# and Web dev 3) MS Excel 4) Browsers – Chrome, Firefox, IE 5) WebDriver for Google Chrome Prepare the Coffee Machine Let’s install NUnit extension, NuGet package manager, Selenium packages and include MS Excel Interop reference into VS2010. Essentially 2 different editors are required from the VS2010 stable: a) Microsoft Visual C# 2010 Express – get NUnit b) Microsoft Visual Web Developer 2010 Express – to get NuGet and Selenium   Let’s get started with Microsoft Visual C# 2010 Express – Invoke Extension Manager: Browse the Online Gallery and download NUnit Test Application: Install NUnit: Confirm that installation succeeded: and this page is displayed in your default browser: Choose to create a New Project: Select th...

QTP – search sub-folders for existence of QTP scripts

  Suppose we want to report on all subfolders in a specific root folder that contain script files. Consider the example folder structure here – ODBC_MYSQL, ODBC_SQLEXPRESS and Test1 are the folders that have QTP scripts: Here’s a VBScript program that takes the root (start) folder as input, and iterates all subfolders recursively to report on the ones that are actual QTP script folders: Note: This program can be run directly as a VBScript program, or from within a QTP script by toggling the comment between lines 17 and 18. (p.s.: if Print statement does not work on specific version of QTP, use the Msgbox statement. For real world test automation projects, do not use either – to avoid human intervention!) On running the program, Folders across various levels (Level 2, 3) get reported!

Connecting to a database from QTP

  The database arrangement: How to connect to database and fetch the Address field 1 from QTP:

Microsoft Test Manager – FUEL for test automation

(this is a follow-up post to this one:  http://sudiptopaul.blogspot.com/2011/12/using-aspnet-page-state-and-theme-to.html ) Traditionally Test Management and Test Automation tools have been remotely related to each other. Microsoft’s Test Manager changes this - Manual Testers contribute effectively by creating action recordings for each test Common portions of test steps can now be grouped into what is called as Shared Steps – again manual tester can create independent action recordings for these Test Manager enables these action recordings to serve as active inputs to test automation – separate class is created for each test case, and a reusable function for each shared step This is very elegant as it saves the test automation engineer an amount of time required to refactor common portions of longish test path recordings The Manual Tester gets to contribute in the Keyword definition phase – an important thing to do, because they are the subject matter experts! Here’...