capybara-webkit driver hangs out when running javascript tests in CI servers - capybara-webkit

When I run my integration tests marked with js: true in my local it works just fine, but when I run them in any CI integration server they hangout until it times out. Is there any known problem with webkit javascript driver? Is there any driver recommended for CI servers as well?

Related

Installing OWASP ZAP as Service on Windows 10

I am Trying to install OWASP ZAP (2.9.0) to run as a service on one of our servers for the testing environment. I've been trying unsuccessfully to use YAJSW. I creates a service but promptly stops running and gives up after a few restarts. The QA team has selenium tests which are configured to run through the instance of ZAP running on a particular server. If Zap in manually started. I would like to just have it running as a background/headless service though. We use YAJSW to run other java applications as services. Not sure why this is failing.

Is it possible to run Desktop application in CICD?

I am automating functional test cases of a application where major part of it is Web UI but at some steps I have a desktop application in Main Frames ,which I automated using TestStack.White. I am able to run these test case in Visual Studio on my computer.
We have planned to put these automated test cases in CICD pipeline in VSTS.
Will I able to run test step where desktop application is involve in CICD pipeline?If yes do how can I do it?
Please suggest.
You can run UI test through Visual Studio Test task (check Test mix contains UI tests option).
Microsoft Hosted agents are pre-configured for UI test for both web apps and desktop apps.
For Self-hosted agent, you need to run it as an interactive process with auto-logon enabled (When configuring agents, select 'No' when prompted to run as a service)
More information: UI testing considerations

How can I get code coverage reports when testing REST API with TestNG?

I have a question that's very similar to what's discussed here:
Integration Test of REST APIs with Code Coverage
I deployed a war file that exposes the REST APIs to a web server and I'm using TestNG to write test cases for the REST APIs. I'm not unit testing - I'm only end-to-end / integration testing. Currently, I'm running test cases from eclipse in my machine.
My goal is to get coverage reports on the TestNG test cases.
Since the tests are local to my machine and the REST API is deployed in another server, EclEmma doesn't provide any meaningful data when I run the tests cases in my machine.
Is there a way to point EclEmma to the web server instead of my local machine and get the code coverage report?
Would it be better/possible to include the tests in the war file and run the tests from the web server? That should allow me to get the meaningful code coverage report, right?
The easiest way forward in cases like this is normally to start the web server inside of your IDE and run tests with coverage measuring in there. Even better to start the web server from within the tests - then a build tool like maven can also do code coverage reporting.

Strategy for Automated UI testing on remote virtual machines

I'm using TeamCity for my CI builds, and I'd like to set up a second build for running automated UI tests on Windows XP and Windows 7 virtual machines.
I imagine the build working as follows:
Compile, run unit tests, etc.
Prepare MSI using WiX
Copy MSI to target test machines
Remotely execute MSI's
Copy test harness code to remote machine
Run tests
Build finishes
The automated UI tests are written using NUnit and would need to be run directly on the test virtual machine (they can't run remotely). It's important that if the tests fail, it appears in the TeamCity build log and the build fails. I'd rather not install VS or the TeamCity build agents on either of the test virtual machines.
It seems that most of this should be possible using psexec.exe. Are there any alternative (preferably open source) tools that I should look at?
takes a deep breath
We were looking into something to help us out with our automated UI tests. We use ranorex to test the UI and TeamCity/Msbuild to execute the tests.
We never found any tools to help us out (I’m constantly keeping an eye out for some so will monitor this thread) but here is what we did instead.
The CI server copies the setup files and test scripts to the Testing Host Server.
The CI server then launches a custom app on the Testing Host Server providing the name of the VM to launch.
The Test Host Server then launches the VM software, using Virtual PC.exe -singlepc -pc vhdname.vhd -launch , and waits for it to shutdown (after it’s run its tests).
The VM grabs the setup files and scripts from the network location and executes.
After the tests are run it then returns the results to a networked location and shuts itself down.
Control is returned to the custom app.
Control is returned to the CI server which determines from the results if it has passed or failed (and updates the UI so developers are made aware of the result).
Results are collection as artifacts in TeamCity and tagged in Svn.
I think that's everything. Its convoluted, however, it works. Hope someone of that helps you.
Jeff Brown of the Gallio team has been talking about a tool called Archimedes that he's planning to write to support this kind of requirement. It sounds promising, but I don't think there has been much progress on it so far.
In the mean time though, there is something in the Gallio project called VM Tool that may do what you want. It provides commands to stop, start and snapshot virtual machines, and more importantly, to copy files back and forth and execute commands.
I presume you have also considered Powershell Remoting?

How to run NUnit integration tests on the target server

If you have NUnit integration tests that test access to the database, how do I run those tests on a build machine where the target database is on a different server.
It's almost like I want to run the integration tests from the build server (using CruiseControl) but have the tests run on the target server so I can exercise the database in question.
I think the simples way is to expose database via network.
NUnit tests can be run from c#/vb.net code.
So according to that, you can create page for running tests, page would be calling codebehind code which then call your tests and you can see results of your tests, remotely.
This should get you started:
http://nunit.net/blogs/?p=23