TestProject Forum

Importing TestProjects scripts

Hi Team,
Please help on below points,

  1. Is it possible to export the TestProject recorded script?
  2. is it possible to export multiple recorded script at a time ?
  3. is it possible to import the exported scripts into the existing Selenium+TestNG project ?

-Naveen.

Hello @naveen.a

  1. You can export recorded tests as YAML file, and run it with the CLI locallyimage
    TestProject Agent CLI - TestProject Documentation

  2. You can export recorded tests to JUnit + Gradle
    image


    GitHub - testproject-io/java-opensdk: TestProject Java OpenSDK

  3. Since exporting recorded tests is done in JUnit and Gradle, you can first convert your generate gradle project using the maven plugin for Gradle:

In the generate build.gradle add
id 'maven'
Inside plugins

plugins {
    id 'java'
    id 'maven'
}

Now in others, you will have an ‘install’ task:

image

After you run it, it will generate a pom.xml file that represents the build.gradle

image

Afterwards, just add the TestNG dependency, and you are good to go.
https://mvnrepository.com/artifact/org.testng/testng

In the near future we will add the ability to generate for Maven and TestNG as well.