serenity-bdd / serenity-rest-starter

26 stars 40 forks source link

Running a JUnit test suit in serenity using Gradle build tool. #2

Open srinidhivn opened 5 years ago

srinidhivn commented 5 years ago

Hi

I had a maven project of test automation using serenity framework. I converted it to a Gradle project using "gradle init" and some manual correction.

Now when I try to run the Gradle project using command "gradle clean test aggregate", suite is not running, instead all the test classes marked with @Test are running. I am sure I have to change something in the build.gradle file, but did not get this setting anywhere.

This is how my test suite looks like,

**

package bddDemo.TestSuite;

import org.junit.runner.RunWith; import org.junit.runners.Suite;

@RunWith(Suite.class) @Suite.SuiteClasses({ serenityBDDDemo.features.calculator.MathsUsingAnAngularCalculator.class, //serenityBDDDemo.features.API.automateRESTAPI.class

})

public class TestSuite {

}

** Please help me in running a test suite, using gradle in serenity.

srinidhivn commented 5 years ago

@wakaleo Can you help please!

wakaleo commented 5 years ago

Have you checked the gradle docs? Testing is explained pretty well.

srinidhivn commented 5 years ago

Thank you for replying in a jiffy! Are you referring to this https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html#N28723 ?

Mr-Chenn commented 3 years ago

@srinidhiVn Did you resolve the issue?