logo logo

Tester’s Month Story – TestProject Test Case Execution

Tester's Month Story – TestProject Test Case Execution

I am from India, so while using the TestProject platform a famous movie always comes to mind 🎬 It’s called “Bhaubali”, and as of now, parts 1 & 2 were released.

I watched the second part of this movie before the first. And just like the Bhaubali part 2 makes me want to watch part 1, so does the TestProject platform. I am learning all tools and concepts available after trying a few, to achieve my personal and organizational goals.

In this article, I will elaborate on command prompt execution syntaxes of offline test cases, to achieve these goals. The above are software automation concepts such as data-driven testing execution, cross-browser testing execution, parallel execution, and batch execution 🌟

TestProject Test Case Execution – Table of Contents:

Offline mode of test case creation in TestProject

  1. Login to the TestProject platform dashboard
  2. Download the latest TestProject agent
  3. Install and register the agent
  4. Create a new project and a new test
  5. Provide the required application URL. Here I used the TestProject example link
  6. In Record click file for offline test case
  7. Click Start recording
  8. TestProject Recorder displayed in separate browser with application home page
  9. Here record all the steps, use parameters wherever required as well as validation
  10. Click the Save button. The created test case is saved in the Downloads folder in a YAML format

New TestProject project

Test case saved locally

Local reports and custom report location 

By default, after each test case execution, reports are generated in both the Cloud and the default local reports folder 📁 Here our requirement is to get local reports only, in the default local reports folder or custom report location. We can get local reports in two ways:

  1. By unregistering the TestProject agent and executing the test case, the report is generated locally
  2. By using the below syntax –report=LOCAL_REPORT, to get reports in local only:
testproject-agent run --parameters parameters.csv -o ~/Desktop --report=LOCAL_REPORT

Here -o ~/Desktop describes the custom report location in a local machine.

testproject-agent run F:\TestProject\tpp_2021-08-23_18_16_27.yaml –o F:\TestProject\Offline_report --report=LOCAL_REPORT

Data-driven test case execution using the CLI

Data-driven testing is a concept in which a user can create a test case for single data with the help of a parameter file, in order to execute the same test case with multiple data. It allows checking whether the application response is as expected or not.

In the above created offline test case by default, the application URL comes as a parameter in the TestProject platform. Fullname, Password, Address, Email, and PhoneNumber are created as parameters in order to pass different values via a .csv file to achieve data-driven testing.

Here the created offline test case name is tpp_2021-08-23_18_16_27 and the parameter filename is Parameters_jana.csv. In the example below, we have provided the file location for both test case and parameter file based on this syntax:

testproject-agent run MyFirstTestBackup.yaml --parameters parameters.csv

In command prompt use the below syntax for data-driven testing:

testproject-agent run F:\TestProject\tpp_2021-08-23_18_16_27.yaml –-parameters F:\TestProject\Parameters_jana.csv –o F:\TestProject\Offline_report --report=LOCAL_REPORT


TestProject test case execution offline report

Cross-browser test execution using CLI

In TestProject, after the creation of an offline mode for a test case in Chrome browser, the user is able to run in other browsers installed on their local machine (Edge, Firefox, and Internet Explorer). The test case will be executed in these browsers and reports are saved locally 💾

On my local machine, I have Chrome browser and Edge browser available, so I used these two browsers in my below syntax. If Mozilla Firefox is installed then –browser Firefox is used for execution in Firefox browser.

testproject-agent run MyFirstTestBackup.yaml --parameters parameters.csv o ~/Desktop –browser  CHROME --browser FIREFOX --browser Edge --report=LOCAL_REPORT testproject-agent run F:\TestProject\tpp_2021-08-23_18_16_27.yaml –-parameters F:\TestProject\Parameters_jana.csv –o F:\TestProject\Offline_report  --browser CHROME --browser Edge --report=LOCAL_REPORT

Command for TestProject cross-browser test case execution

Chrome browser report

Edge browser report

Test case execution results

Parallel execution using CLI

Execution settings for a stand-alone YAML file, the following options are available by -s or –settings should be used to provide an external setting file.

Enabling –parallel-targets will result in tests being executed one by one on all defined browsers/devices, in parallel.

Enabling –parallel-tests will result in all tests being executed on all defined browsers simultaneously 🎯 If a test has a data source, all data iterations will run at the same time as well.

SYNTAX for TestProject CLI for parallel execution:

testproject-agent run MyFirstTestBackup.zip --settings settings.yaml --parameters parameters.csv -o ~/Desktop --parallel-tests --browser CHROME --browser FIREFOX --browser Edge --report=LOCAL_REPORT
testproject-agent run F:\TestProject\tpp_2021-08-23_18_16_27.yaml --settings settings.yaml --parameters  F:\TestProject\Parameters_jana.csv  –o F:\TestProject\Offline_report  --parallel-tests --browser CHROME --browser Edge --report=LOCAL_REPORT

Command for parallel execution

Parallel test results

Batch execution

As of now, we execute the single YAML file in the above automation execution. Here in batch execution, we can execute multiple YAML files in a single execution.

Dependency: Shell Script application needed. (MinGW) GitBash:

  1. Create a script file, it will contain all YAML files with the correct Syntax to run your files
  2. Save the file in Shell Script(.sh) format
  3. Keep the file with the sh application in a folder
  4. In command prompt, use the below command with the respective path of folder runner.sh. Here runner is the name of the saved file:

Batch execution command

Batch execution

With the help of a minimal learning curve in software testing and automation concepts, every software tester can easily achieve results in a perfect manner! 💪

About the author


I have recently completed my 5 years of Experience in Software Testing. I have Hand-on Experience in Manual Web application and Mobile application testing and know a few required Coded Automation Concepts. I am utilizing my Knowledge and Experience in TestProject Codeless Automation Platform for E2E testing in Mobile, Web and API for my Organization.

Leave a Reply