Question

We are looking forward to using squashTA to manage our tests. The problem we are facing is that we already have a big automated tests collection and aren't able to make them run via squash TM using squash TA.

Our tests are using junit+selenium WebDriver+SpringFramework. Currently, we launch our automated tests via maven (in commandLine), and we have a jenkins server running them regularly.

We tried to reuse our tests in a squash TA project, putting them in src/squashta/resources/selenium/java

But code in this folder doesn't even support java packages. It's like the java in the example isn't real java but a fake java parse by squashTA.

Is there any mean of using such already existing tests with squash(TA/TM) ? Or, any alternatives you know that could do the job ? (we are currently using testlink and must change).

Was it helpful?

Solution

If your selenium test is in :

src/squashTA/resources/selenium-test/src/main/java/org/squashtest/ta/selenium/PetStoreTest.java

With a such structure, the test automation script to run the selenium test (which is in the package org.squashtest.ta.selenium) is :

TEST :
LOAD selenium-test/src/test AS seleniumTestSource
CONVERT seleniumTestSource TO script.java(compile) AS seleniumTestCompiled
CONVERT seleniumTestCompiled TO script.java.selenium2(script) USING $(org.squashtest.ta.selenium.PetStoreTest) AS seleniumTest
EXECUTE execute WITH seleniumTest AS seleniumResult
ASSERT seleniumResult IS success

If your selenium test has some dependencies to other libraries (like to spring in your case), you have to add those depencencies as dependency of the squash-ta-maven-plugin in the pom.xml of your Squash TA project

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top