Skip to content

3. Eclipse IDE HowTo

James Crocker edited this page Nov 12, 2016 · 5 revisions
  • Java 1.8+ or OpenJDK-8 required
  • Platform browser's corresponding web driver installed or Selenium-HUB in grid configured
  • Clone project git clone https://github.com/siostechcorp/coseng.git
  • Import Maven -> Existing Maven Projects browsing to coseng.git directory
  • Create a new TestNG/Selenium test class. Suggest using a new package. eg. com.sios.stc.coseng.tests.myWebApp with your test classes created beneath it. (See com.sios.stc.coseng.tests.demo as an example)
  • Your TestNG/Selenium test classes must extend CosengRunner. Example DuckDuckGo.java
  • NOTE! Only access the web driver from withing the test class' methods. Concurrent execution and access of the web driver anywhere other than within the test class' methods will result in unintended consequences and likely test failures. Example Google.java
  • Create a TestNG suite XML referencing the test classes you want to test against. Example oneWebDriver.xml
  • Create a COSENG Tests JSON file and include the just created suite(s) xml. Example oneWebDriver.json
  • Create a new Run Configuration
  • Configure the run environment Main to use com.sios.stc.coseng.RunTests
  • Configure the Run Arguments to include reference to the COSENG Tests JSON file. May be relative or absolute path. eg. If myTests.json in project src/main/resources/coseng/tests/myTests.json then -tests coseng/tests/myTests.json. If elsewhere on filesystem as say /tmp/myTests.json then -tests /tmp/myTests.json
  • Configure the Run Arguments to also include reference to custom Node JSON (if defaults don't match your environment) -node myNode.json. May be relative or absolute path. eg. If myNode.json in project src/main/resources/configs/myNode.json then -node configs/myNode.json. If elsewhere on filesystem as say /tmp/myNode.json then -node /tmp/myNode.json
  • Run it!

Clone this wiki locally