Selenium Grid using Gradle

eclipse

(Selva Kumar V) #1

Hi,
Since im a new bee to gradle i would like to know is there any documentation on how to implement selenium grid parallel execution using gradle. Is there any sample project which has this. I just want to run in 3 node. One with firefox and other two with IE and Chrome. Currently im using the gradle plugin Buildship in my Mars Eclipse.


(Selva Kumar V) #2

Hi,
found a way to do the run.

In the test suite file need to add

public class GridSerenitywithTestSuite extends SerenityStories {
	public GridSerenitywithTestSuite() {
		super();
		getSystemConfiguration().setIfUndefined(ThucydidesSystemProperty.WEBDRIVER_REMOTE_URL.getPropertyName(),
				"http://localhost:4445/wd/hub");
		getSystemConfiguration().setIfUndefined(
				ThucydidesSystemProperty.THUCYDIDES_DRIVER_CAPABILITIES.getPropertyName(), "browserName:chrome");

		getSystemConfiguration().setIfUndefined(ThucydidesSystemProperty.THUCYDIDES_STORE_HTML_SOURCE.getPropertyName(),
				"true");
		getSystemConfiguration().setIfUndefined(ThucydidesSystemProperty.THUCYDIDES_TAKE_SCREENSHOTS.getPropertyName(),
				"FOR_FAILURES");
	}

	@Override
	public List<String> storyPaths() {
		return Arrays.asList("stories/GoogleSearch.story");
	}

	@Override
	public void run() throws Throwable {
		super.run();
	}
}

Just like that we have to override the serenity.property files.

If anyone knows a better way than this please do comment and help me.

Thank you


(Vinícius S. Pazzini) #3

Hey, how did you make that work?