1. Preface
    1. About MarathonITE
    2. Supported Platforms
      1. Java/Swing™
      2. Java/FX™
      3. Web Applications
    3. What's New in MarathonITE 5.0
    4. Change Log a.k.a Version History
    5. System Requirements
    6. Copyright Notice
  2. Getting Started
    1. Introduction to Test Automation
      1. Unattended Testing
      2. Semi Automated Testing
      3. Exploratory Testing
    2. MarathonITE Projects
    3. Your First Project
      1. Java/Swing™ Test Project
        1. Application Under Test - SwingSet3
        2. Creating a Project
        3. Recording a Test
        4. Anatomy of a Test Script
        5. Running Tests
        6. Looking at Results
      2. Java/FX™ Test Project
        1. Application Under Test - Ensemble
        2. Creating a Project
        3. Recording a Test
        4. Anatomy of a Test Script
        5. Running Tests
        6. Looking at Results
      3. Web Application Test Project
        1. Application Under Test - DuckDuckGo Search
        2. Creating a Project
        3. Recording a Test
        4. Anatomy of a Test Script
        5. Running Tests
        6. Looking at Results
    4. MarathonITE Sample Projects
  3. User Guide
    1. Installation and Startup
    2. MarathonITE User Interface
      1. Views
      2. Editors
      3. Output Views
    3. Creating Marathonite Test Projects
    4. Recording Tests
    5. Managing Checklists
    6. Exploratory Tests
    7. Semi Automated Tests
    8. Executing Tests
      1. Executing a Test from Editor
        1. Debugging Scripts
        2. Using Script Console
      2. Executing Tests from Test Runner
      3. Executing Tests in Batch Mode
    9. Organizing Tests
      1. Organizing Tests in Folder Heirarchy
      2. Organizing Tests as Features and Stories
      3. Organizing Tests in Suites
      4. Linking Tests to TMS and Issue Manager
    10. Modularizing Test Scripts
      1. Module Methods
      2. Extract Method Refactoring
      3. Using Data Loops
      4. Convert to Data Loop Refactoring
    11. Data Driven Tests
      1. Convert to DDT Refactoring
  4. Advanced Scripting
    1. Ruby Programming Language
    2. Marathon and Ruby
    3. Selenium/WebDriver Bindings
      1. Java/Swing™ Components
      2. Java/FX™ Controls

3.11.Data Driven Tests

Data Driven testing (DDT) is creation of test scripts where the input as well as results are accepted from an external data source. In the simplest form the tester supplies the inputs from a row in the table and expects the outputs which occur in the same row. In the context of Marathon, the input is the values that you set to the components and the expected results are what you provide in the assert methods.

MarathonITE also provides you a way to create a loop that is data driven. This is especially useful when you need to perform same set of operations multiple times such as creating a set of accounts.

MarathonITE's data driven framework has Create DDT and Create Data Loop refactorings that simplify creation of data driven tests. It also includes a CSV file editor for quick creation of data.

Marathon CSV Editor

Marathon CSV Editor

Testing with External Data

In data driven testing, you provide the data from an external source. Marathon supports CSV format files for accessing the data. The header in the CSV file provides the variable names used in the test and each subsequent row contains the data for each test run or loop. The advantage of data driven testing is that you can add additional inputs to the data file for different cases without touching the test script. This segregation of test control and test data improves the maintainability of the test project.

Marathon Data Driven Tests

Marathon data driven tests are regular test scripts with a magic marker in the form of usedatafile in the test header. The usedatafile also provides the name of the test data file that contains the data. The data file has a header row that defines variable names and subsequent rows with the data. When Marathon encounters a data driven test – recognized by the usedatafile marker – it considers this test as a suite of tests with one test for each row in the data file. Marathon also reads the file and defines a global variable for each data column and assigns it with the value from the data column of the current row. If the first column name is marathontestname the name is appended to the test script name to create individual test names.

Data Driven Tests in Test Runner

Suggest Edit