Automate testing with out installing anything on client machine - automation

We have a requirement to automate testing on website with out installing anything on client machine(including with out running driver in client),
I have gone through grid model in selinum, but there we need to run webdriver on client machine which I can't do.
So, I need suggestions how can I automate web site with out installing or running jar or dll on client machine.
I am looking for any possibility injection of automation script from server machine to client.

Try Sikuli Automation tool.
you don't need to install sikuli application in your client machine.
Import sikuli libs with java program - http://sikulix-2014.readthedocs.org/en/latest/faq/030-java-dev.html
Export your program as executable jar and use it in your client machine

Related

Can i use that selenium java code to build it in VSTS

I have hybrid framework , which is selenium with java in eclipse. Can i use that whole code to build it in VSTS
Yes, you can. If the Hosted agent doesn’t meet the requirement(s) (such as Chrome: Install headless chrome on hosted build servers), you can set up the private agent on your local machine and do build and test with this agent.
Deploy an agent on Windows

Using Selenium without java runtime

Is there a way I can use selenium without having to install java runtime on my remote machine?(the machine where the browser is)
The machine that automates the process( where the tests run will have java) but the remote machine where the browser is does not have java. is it possible? and if yes how ?
You can try using Launch4j for embedding JRE into your java application package.
Useful links:
1. Launch4J
2. A SO post for how to do it.
3. Another SO answer which describes how to do it on different OSes

Will webdriver script compiled and run on windows will also run on ubuntu?

Currently I use to create and run scripts using java +eclipse+ junit+ webdriver in windows platform.Now if i shift to Ubuntu platform do i need to make any changes in configuration to run all supported browser.
Thanks
Yes it will work.But you need to check the browser for which scripts are designed.As it may be possible that you need to do code changes for web browser drivers for respective operating system.
Also make sure that all the software's java/eclipse/junit/web driver are configured on the linux machine.

How to use Selenium Grid to run some commands on the node and system commands locally

I'm trying to solve a problem and I was hoping I could do it with Selenium Grid but I'm not entirely sure that it's possible. Here's my problem...I'm developing test cases using Selenium WebDriver and I need my tests to run on a Windows machine however the AUT runs on a Linux server. I have several tools that only run on Linux and I would like to be able to run some commands/tests on the Windows machine and others in the Linux server. For instance
Test Starts -> Firefox launches (Windows machine)
Login to site (Windows machine)
Run command in Linux server
Return running commands/tests on the Windows box.
Alternatively I could figure out how to run those commands remotely from a Windows machine but I'm not looking forward to doing that.
Out of the box, you cannot use selenium to run commands on your local machine. Selenium/Webdriver is a browser testing tool and can interact only with browser.
Updated Answer based on your comments
Common part to both ways (which I think you already know)
In your java code you should have the code for webdriver/selenium commands that will do step 1 and 2. Your java code should also the contain the logic/code to execute the linux commands as step 3. Step 4 should again be your webdriver command.
This test code should run from the linux server so that the java command execution will happen in the linux box.
Now the only pending part is the execution of test in remote machine.
Method 1 without using grid
Start the selenium server in the windows machine. Point your java tests to the selenium server running in this machine. If your windows machine IP is 10.0.0.1, you should initialize the webdriver object as
WebDriver wd = new RemoteWebDriver(new URL("http://10.0.0.1:4444/wd/hub"),DesiredCapabilities.Firefox());
This will send all your webdriver commands to the selenium server running in 10.0.0.1 on port 4444. Your tests will then get executed in the windows machine. For this to work, your linux server and windows machine should be in same network.
Method 2 using grid.
Its all the same as above, but instead of giving the ip/dns name of windows machine, you should give the ip/dns name of the hub machine. You should also have windows machine registered as an RC to that hub.
I think with AutoIT kind of windows frameworks, we can invoke C:\Windows\System32\cmd.exe to open a command prompt and run some .bat files. If it is Linux /bin/csh or /bin/bash myscript.sh.

Possible to register Selenium RC's with the Hudson Selenium Grid Hub w/o the RC's being slaves in the Hudson cluster?

I am trying to get Hudson to run my ruby based selenium tests. I have installed the Selenium Grid plugin, but I don't want to have the RC's running as slaves in a Hudson cluster. The reason for this is I don't want to waste the next six years of my life trying to configure each of my projects in various Windows environments.
Hudson currently pulls each project from Github and builds it just fine. With a regular Selenium Grid setup, I am able to edit the grid_configuration.yml file to represent the various environments I wish to tests against, then pass environment variables to the rake task that runs the test i.e. which browser/platfom to run on and the URL of the application under test -- usually a port on the hub machine running in a specific environment.
In this way, the machines on which the RC's run don't need to know anything about the source code of my apps, they just need to have selenium-grid installed and have registered with the hub.
Is there a way of elegantly emulating this with Hudson?
do you have a concept of build agents, I do not know much about Hudson. We are using Anthill Pro at work and we have set up an Ahtill Pro agent. The source code is downloaded to the agent and the agent is responsible to run the maven goal for running the tests. It works pretty well for us as the RC machines are not part of the build environment. the tests are responsible to talk to Selenium HUB and get new sessions and do the testing.
I hope this helps.
Cheers
Haroon
I chose to not use the plugin in order to take advantage of the newer Grid version. I cloned a few VMs with a startup script that runs ant launch-remote-control from a shared drive that they can all access. Hudson doesn't have, and doesn't need any access to the Grid nodes and they aren't slaves to Hudson. I altered my Hudson server to launch the hub on machine startup. This setup allows me to run the grid normally with or without Hudson.