remote execution in sikuli - java

I have an integrated selenium/sikuili automation project which I would like to run on windows agent here is the scenario: Machine (A) contains the source code Machine (B) is the agent test runner machine that has selenium grid running on it, when machine a run the test, selenium test is successfully triggered on machine B but when sikuili runs it's trying to search elements on machine(A). anyone has any idea how could I fix this issue.
thank you all in advance

You may want to use selenium grid extensions:
https://github.com/sterodium/selenium-grid-extensions

I fixed it using Jenkins, what I have basically done is creating a salve agent and point it to a remote machine(where I actually build and run my project) just made sure that I had sikuili as var in my remote machine.

Related

Run selenium webdriver IntelliJ/Java/JUnit w/multiple computers on same central project folder

I would like to have laptops and vm's creating, maintaining and running selenium tests all from the same common IntelliJ Project folder on a network shared drive.
Is it possible to setup a centralized project folder for IntelliJ so that multiple computers with IntelliJ installed running Selenium Webdriver and JUnit can execute the same tests from a singular location even at the same time? I am not using robot.
I am using IntelliJ 2017.2.3, Java 1.8.0_121, JUnit 4.12, Maven 3.3.9
My advice here would be to do the following:
Make sure your project is in a reputable version control system (GitHub/Git)
Determine your exact requirements of why you need to carry this out?
Research selenium-grid (you can run tests on multiple browsers/devices at the same time, this way you could run them on one machine pointing to one grid instance, and on the other machine point it to another.
Look into CI/CD (Jenkins) - This will allow you to parameterize your tests so you can kick them off at specific times pointing to different grid instances.

Run Selenium Java Test in VSTS(Visual Studio Team Service)

I have written selenium java code to do the UI automation test in eclipse. Now, I want those code to be runed in VSTS. Problem is that there are lots of components which I am not clear how they are used under the tab "build & release". So I am looking for masters who can share with me the steps to achive my target. Thank you.
If the test need to be run in interactive way, you need to setup a build agent with Interactive mode. (e.g. Deploy an agent on Windows), then run test through this build agent.
There is the Maven task that can run java test.
A related article: Testing Java applications with VSTS

Selenium webDriver/Maven java tests on Jenkins not able to communicate with firefox

I'm trying to use jenkins to create automated regression tests for a web app. Jenkins basically fetches my maven project from git and reads the pom.xml. Then the test suite is started. The problem is that my tests are using selenium web driver in combination with gekodriver in order to launch firefox and navigate on the website. But everytime I launch the tests I get those errors:
Console logs
I'm running Jenkins as a service (it's how it was launched after installation) and my tests work fine when ran through eclipse or java. So I think the problem comes from how the jenkins handles selenium webdriver.
As you can probably see, I'm on a Windows 7 professional license. Firefox and gekowebdriver are updated to the last versions.
Fixed:
Jenkins being ran as a service was the problem. In order for selenium to properly display firefox, it needed to access the desktop. Fixed the issue by simply allowing Jenkins service to use the desktop. It makes for a poor fix but it works fine.

Running Selenium test do not work on Jenkins

When I run my test on local machine all works fine. But when I move to Jenkins I get error org.openqa.selenium.NoSuchSessionException: no such session
I do not get what can be wrong? I tested before simple test without Selenium and it works fine. In Jenkins I have linked my repo and run my test with gradle test.
Summary:
First answer is given by #ashley-frieze: You need to have Chrome Browser installed to to run test against it.
Second issue: To see the browser running, maybe take a look at Jenkins : Selenium GUI tests are not visible on Windows , where it is suggested to allow the service to "interact with desktop". Maybe that helps.

Running Selenium Tests through JUnit in Hudson

apologies for the somewhat confusing title :-) Basically, I've configured my Selenium tests to run through JUnit when I build the project through maven. If I start my Selenium Server in a command prompt and then run the maven build goal in another cmd prompt then the tests runs as expected.
I figured that this process would be easy to implement in Hudson but it has proven quite problematic. I can start my selenium server as before and then configure the build to kick off via a hudson job. However, hudson doesn't seem to be picking up the selenium server - I get an error message which says the following:
Unable to obtain goal [test:test]
The reason I think that hudson isn't contacting the selenium server is because when I run the junit tests through my own command prompt with my server stopped, I get the same error message.
Its also important to note that I used to use the seleniumHQ plugin for hudson to run my tests using html files - but wish to change to JUnit as its more flexible.
Any help on this is very much appreciated!
Thanks,
Gearoid.
I recommend that you run selenium tests separately from the test:test goal.
You can create two hudson builds for your project, with the second build being triggered by the successful completion of the first build.
Why would you do this?
Unit tests complete faster, so your feedback time is mush shorter
the second build can run a shell script or ant instead of maven, allowing you easier control of your remote server
The selenium tests won't be triggered by mvn test on a developer machine, which could cause conflicts.
You can run two hudson nodes in a "farm" configuration, the second instance can run on the same server as selenium. Server affinity can be set up for specific builds.
Is there a config file with the server URL that is not being picked up running inside Hudson? Can you print the server URL to make sure it's pointing at the right place?
You could use the selenium-maven-plugin to start and stop the selenium server automatically as part of the maven build process.

Categories