Tutorial: Create and Execute your first testcase

    In this tutorial we show you how to create and execute your first testcase.

    Requirements

    To follow this tutorial successfully we recommend you to have a Microsoft SQL Server ready with an installed Adventure Works Sample Database. This sample database can be downloaded from GitHub using the following URL. You can find installation instructions there as well: https://github.com/Microsoft/sql-server-samples/releases/tag/adventureworks

    You can use another database as well, but in this case you need other SQL queries then we do in this tutorial.

    Please ensure that the service account of BiG EVAL has read-permissions on the Adventure Works database.

    Overview

    The following steps must be performed during this tutorial:

    1. Setup Datasource
    2. Create Testcase
    3. Execute Testcase

     

    Setup Datasource

    We use the ERP database of the sample company Adveture Works in this tutorial. To enable BiG EVAL to access this database you need to create and setup a datasource. This datasource can be used in as many testcases as you want afterwards.

    1. Click on "Environment" and "Datasources" in the main menu.
      tutorial_01_navigation_datasources_en.png

    2. Click on "Create Datasource".
      tutorial_01_add_datasource_en.png

    3. Enter "AW ERP" as the name and select "OLE DB" as the type of the datasource.
       
    4. Change to the tab "Connection" and enter the following connectionstring. Replace SERVER and DATBASE by the respective hostname of your Microsoft SQL Server and the name of the Adventure Works database.
      Provider=SQLNCLI11;Server=SERVER;Database=DATABASE; Trusted_Connection=yes;
      Example:
      Provider=SQLNCLI11;Server=localhost;Database=AdventureWorks2014; Trusted_Connection=yes;
    5. Ensure that the dialect is set to "Microsoft SQL Server (T-SQL)".

    6. Click on "Create Datasource" to save the settings.

     

    Create Testcase

    1. Click on "Tests" and "+ Create Test" in the main menu.
      tutorial_01_add_test_en.png
       
    2. Enter the name "My first test" and click on "Create Test". The Test-Editor gets opend.
       
    3. Ensure that the testmethod "Probes exactly equal" is set.
      tutorial_01_testmethod_en.png
       
    4. Switch to the tab "Probes".
       
    5. Click on "Add Probe" and "Add dynamic probe". The configuration interface of the new probe gets opened.
      tutorial_01_add_probe_en.png
       
    6. Select the datasourcde we created before.
       
    7. Enter the following SQL-Query into the Query-box.
      SELECT count(*) 
      FROM [HumanResources].[Employee]
       
    8. Ensure that the extraction "Value of the first cell" is selected.
      tutorial_01_extraction_firstcell_en.png
       
    9. Click on the button "Validate" to execute the SQL-Query. There should be a success-message when the execution finishes. If there is an error message it usually means that you don't have access to the database. Otherwise you see a respective error message.
      tutorial_01_validate_probe_result_en.png
       
    10. Repeat steps 5 to 9 to add a second probe.
      For simplicity reasons we add two identic probes to the testcase during this tutorial. Normally you add two or more different probes.

     

    Execute Testcase

    As soon as you have at least two probes added to the testcase, you are able to execute it. Following we start the testcase manually. There are more possibilities to automate testcase execution, but we do not look at this possibilities within this tutorial.

    1. Click on the Play-button in the top right corner of the Testcase-Editor to start the test manually. Shortly you see a notification in the messagecenter that tells you that the testcase is currently executing.
      tutorial_01_play_en.png

    2. As soon as the testcase finishes, you get another notification that allows you to access detailed testresults using the button "Detailed Results".
      tutorial_01_message_success_en.png

     

    Was this article helpful?
    0 out of 0 found this helpful

    Comments