How to run the selenium tests from a jar file

Hi ,

I have a project with structure
src/main/java
src/test/java
to run the selenium tests.

I have created a build.gradle which will execute the tests under src/test/java when I invoke using ./gradlew test

I have also created a jar file which consists of both src/main and src/test classes.

Can someone help me, how I can invoke the tests using the jar I have created.

Thanks

Your Selenium should be able to run as-is from your Gradle project as long as you have the necessary dependencies declared in testCompile & testRuntime (or testImplementation).

So I am not exactly sure what you are really asking. Are you trying to build a JAR containing Selenium tasks that you want to run standalone or are you just asking for help on how to integrate Selenium into a Gradle build?