TestProject Forum
Powered by leading experts in the test automation community

How can I debug Test and run it locally in my IDE?

Hello, I have read the description on github here:

It says:

[quote]Runner Project
To debug or run the test locally, you need a Runner:

Create a new project
Reference TestProject SDK.
Reference the project of your test.
Create a runnable class.
Invoke your test from the Runner project.[/quote]

But I have no idea how to do all this stuff…
Can you please give some basic explanation that helps me get started?


Hello jaki,

In order to run some test, you need to use the Runner object.
Please look at the following file:

The following line:

try (Runner runner = new Runner(devToken, driverSettings)) { 

Create an instance of Runner object.
The instance contains a method called run(…).
This method gets in its first parameter an instance of the test. I our case the test is “BasicTest” that can be found here:

We pass the instance of the test to the run() method of the Runner object:


Then, the method will run the test locally on without testproject platform.

When you run the test on testproject platform, there is no need for the Runner object.
because testproject platform have it’s own run mechanism for running test so that it call directly to the entry point of the test (The execute function).

We recommend you to download the example and use it as a template for your tests.

We hope it helped you to get started.

If you have more questions, you are welcome to ask!

Good luck!

HI I have done above settings, also set devToken path here private final static String devToken = “”;
I have install agent and its running.

but when I am running the ‘TestRunner.java’ I am getting below error
21:42:17.919 [main] DEBUG io.testproject.java.sdk.v2.Runner - Starting development session…
21:42:20.414 [main] ERROR io.testproject.java.sdk.v2.Runner - Failed to connect to https://local.rdr.tpagent.io:8443, Agent is running?
java.lang.InstantiationException: Failed to start development session!
at io.testproject.java.sdk.v2.Runner.(Runner.java:161)
at io.testproject.java.sdk.v2.Runner.(Runner.java:121)
at io.testproject.examples.sdk.java.ActionRunner.main(ActionRunner.java:19)

I have open https://local.rdr.tpagent.io:8443 path on my browser its showing as

TestProject Agent (0.41.26) on akash-Lenovo-ideapad-320-15IKB (Linux)

Installation path: /home/akash/testproject/agent

Data path: /home/akash/.testproject/agent


Registered: Yes (6674)

Authorized: Yes (mZTVVsc9FkKjcSNkObK5IQ)

Alias: Agent001

Please help me how we can solve this.

What is the JDK version you use? Please make sure you are using JDK 8. you can find it bundled with the Agent under JRE folder

yes I am using java 8 only
akash@akash:~/Downloads$ javac -version
javac 1.8.0_171

I download project from github, set dev key , set java sdk then try to run the project.
do i need to change more setting?
I am running this in ubuntu 16.04.

Are you using an IDE? If so, which one?
Can you try running the following curl command from terminal?
Replace YOUR_DEV_TOKEN with actual token.

curl --request POST \ --url https://local.rdr.tpagent.io:8443/api/development/session \ --header 'Accept: application/json' \ --header 'Authorization: YOUR_DEV_TOKEN' \ --header 'Cache-Control: no-cache' \ --header 'Content-Type: application/json' \ --header 'Postman-Token: 9f6fd82c-c619-4929-9487-5bef3a0e0399' \ --data '{\n "driverSettings": {\n "mobileSettings": null,\n "desiredCapabilties": null,\n "desiredCapabilitiesObject": null,\n "mobile": false,\n "type": "Chrome"\n },\n "sdkVersion": "0.41.0"\n}'

What is the response status code ?

I am using Eclipse,
I run above curl command , result I got : {“status”:405,“code”:500,“source”:null,“message”:“Application error occurred during the request processing, please try again”}

The Curl Command I used

curl --request post--url https://local.rdr.tpagent.io:8443/api/development/session   --header 'Accept: application/json'   --header 'Authorization:  Ds9WipbhLfcIlnem4LNxzNRloBz8Mt9YnM3CHmQ_l9k1'   --header 'Cache-Control: no-cache'   --header 'Content-Type: application/json'   --header 'Postman-Token: 9f6fd82c-c619-4929-9487-5bef3a0e0399'   --data '{\n  "driverSettings": {\n    "mobileSettings": null,\n    "desiredCapabilties": null,\n    "desiredCapabilitiesObject": null,\n    "mobile": false,\n    "type": "Chrome"\n  },\n  "sdkVersion": "0.41.0"\n}'

Also I have created JAR for same and uploaded to TestProject platform it is working fine.


Can you please send me via email (to this address: karen@testproject.io) your Agent logs?
You can find them here:

Thank you!

Thanks for the reply,
I have sent you the mail.

Thank you. I received it.
We will review this issue and get back to you ASAP.

Error you get does not make sense, please try again using the command attached after replacing YOUR_DEV_TOKEN with your token.

hi I have tried this attached command with YOUR_DEV_TOKEN change

curl --request POST \ --url https://local.rdr.tpagent.io:8443/api/development/session \ --header 'Accept: application/json' \ --header 'Authorization: Ds9WipbhLfcIlnem4LNxzNRloBz8Mt9YnM3CHmQ_l9k1' \ --header 'Cache-Control: no-cache' \ --header 'Content-Type: application/json' \ --header 'Postman-Token: 56b92afa-35f2-41fb-91a0-0a863f50e6b0' \ --data '{ "driverSettings": { "mobileSettings": null, "desiredCapabilties": null, "desiredCapabilitiesObject": null, "mobile": false, "type": "Chrome" }, "sdkVersion": "0.41.0"}'

and got below response

{“status”:500,“code”:0,“source”:“ServerError”,“message”:“Application error occurred during the request processing, please try again”}
Then I tried with change in type: as Firefox
the I got response as


please help to understand this

I wanted to verify that Agent API is accessible.

First request fails since you have no Chrome installed.
Second with type: Firefox works fine.

Can you please share you Runner source? Do you specify Chrome or Firefox in driverSettings?

hi, yes I did specify Firefox browser here
find below runner source file

[code]package runner;
import Test.GoogleTest;
import io.testproject.java.classes.DriverSettings;
import io.testproject.java.enums.DriverType;
import io.testproject.java.sdk.v2.Runner;
public class TestRunner {
// Setting the development token
private final static String devToken = “Ds9WipbhLfcIlnem4LNxzNRloBz8Mt9YnM3CHmQ_l9k1”;

public static void main(String[] args) throws Exception {
    // Creating driver settings to be used when running the test
    DriverSettings driverSettings = new DriverSettings(DriverType.Firefox);

    // Running the test using TestProjectRunner
    try (Runner runner = new Runner(devToken, driverSettings)) {

        // Create test
        GoogleTest test = new GoogleTest();
        test.name = "John Smith";
        test.country = "United States";
        // Run test
    } catch (Throwable e) {
        // TODO: Handle debug failure...


help on this

Locked due to inactivity.