Robot Framework is a generic test automation framework for acceptance testing and Acceptance Test-Driven Development (ATDD). It has easy-to-use tabular test data syntax and utilizes the keyword-driven testing approach.
Keyword-driven testing, also known as table-driven testing or action word-based testing, is a software testing methodology suitable for both manual and automated testing. This method separates the documentation of test cases, including the data to be used, from the prescription of the way the test cases are executed. As a result it separates the test creation process into two distinct stages, a design and development stage and an execution stage.
Overview of Framework Architecture
Batch Manager: Component-written C#.NET class library takiing care of triggering the QTP, including collection of event logs after test completion and converting them into XML and pushing into a Sharepoint server and reports shown in the web browser using SSRS (SQL Server Reporting Services) for multiple users and the clients.
The reason it is implemented in this way is to ensure single component controls, both unit testing, regression testing and automation testing (including load and performance tests as written with CodedUI and DBFit for Data Base tests). The Reporting System with SSRS is well integrated with the SharePoint portal for daily test reports for all the tests above.
- Used to control the execution of regression tests as in the following:
- Invokes HP QTP application
- Opens a test in HP QTP
- Associates function libraries and shared object repository
- Runs the test
- Used to store test run information, test-specific reports and log files in the Reports DB
Configuration File: Generated automatically after completion of every build ready with TFS (Team Foundation Server). The rest of the key-driven approach is as below.
Pros
An advantage is that maintenance is low in the long run as in the following:
- Test cases are concise:
- Test cases are readable for the stake holders
- Test cases are easy to modify
- New test cases can reuse existing keywords more easily
- Keywords are re-used across multiple test cases
- Not dependent on a specific tool or programming language
- Division of Labor:
- Test case construction needs stronger domain expertise, fewer tools / programming skills
- Keyword implementation requires stronger tool/programming skills, with relatively lower domain skill
- Abstraction of Layers
Cons
A disadvantage is:
- Moderately high learning curve initially(*)
QTP Test Project Folder Structure
The key-driven approach need to be used as in the following:
- Preparation test script in Excel or other supported documents or databases with test cases and detailed test steps.
- Create a new test project in QTP with only three actions as described below.
Action 1: Import the test cases from the Excel Sheet and store in the internal table format supported by QTP
Action 2: Execution of Test Cases with Test Case ID and every individual test case with detailed steps that calls the individual function library for better reusability and maintenance.
Action 3: Again Export the test results back to the Excel Sheet
Implementation for the keywords is already a part of the tool. Examples include Selenium and QTP. Testers or test designers (who do not need to know how to program) that write test cases based on the keywords defined in the planning stage that have been implemented by the engineers. The test is executed using a driver that reads the keywords and executes the corresponding code.
Test Cases Sheet in Excel
Detail Test Steps sheet in Excel
Action 1: Import the test cases from the Excel Sheet and store in internal table format supported by QTP
'**Get my data from Excel Test Cases template***
'Add DataSheets
DataTable.AddSheet("dTestCases")
DataTable.AddSheet("dTestSteps")
'Call Test Management Function Library
Call TestManagement()
MainLogger("=====:: START Importing Excel Sheet ::=====")
'Variable Allocation
strImportTestSheetFolder = strGetConfigValueOf("IMPORTTESTSHEETFOLDER")
DataTable.ImportSheet(strImportTestSheetFolder, "TestCases", "dTestCases")
DataTable.ImportSheet(strImportTestSheetFolder, "TestSteps", "dTestSteps")
On Error Resume Next
If Err.Number <> 0 Then
MainLogger("=====:: Import Exceel Sheet Failed : Please Close the Excel Sheet and Run Agian : ::=====" & Err.Number & "|" & Err.Description)
End If
On Error GoTo 0
'*End of Emporting TestCases and TestSteps in Excel Sheets*********

Gowtham RajamanickamPosted Apr 25, 2015, 5:33 AM
good
David LuuPosted Dec 9, 2013, 2:23 AM
I'm confused, how does this related to Robot Framework (RF)? The actual RobotFramework.org framework that is. You only mention about RF in the beginning, then all the details thereafter are about keyword driven testing and QTP. And I don't seem to see any source code links for trying out/evaluating the solution you present. So as a whole, it's really bare, and more like a blog post about your idea or what you've done in this area (but which the code is proprietary for your employer, etc. so can't share that).
Dinesh BeniwalPosted Aug 5, 2013, 11:52 AM
Good start Jagan, Welcome to the C# Corner