Identify jenkins error messages for failed tests and debugging - visual-studio

Is it possible to find out why the tests on the jenkins server failed? Meaning like an error message? I am new to testing and although I did some front end testing with Chutzpah, this is a totally new concept. Could someone please throw a light on this?Also, is there anyway to debug my tests in jenkins?
I am running my tests on visual studio and all the tests are passing but when I run them on jenkins, I see that some of them are failing and some of them are passing

There should be a "Console log" link on each test; click on that.

As Oli Charlesworth sad use the "console log" (+1) there you get (nearly) same errors like in VS. Mostly I scroll down to the end of the log and search for the error bottom up, because the error is usually one of the last actions.
I do not know anyway how you can debug tests in Jenkins.

Related

RPC Server Unavailable error on TestComplete 11

I am hoping someone here can at least point me in the right direction to solving this frustrating issue. The smartbear community had no response.
I have a bunch of tests set up in TestComplete to test a web application. When I run them all at once, I consistently get an RPC Server Unavailable Error. I have no idea what this means. When I run the tests individually, there is no issue with the scripts.
I have tried running them in a script, calling them from a keyword test, and just using the project set up to call them all in order. No dice. Running each test manually completely defeats the purpose of automation.
Any ideas on how to fix this or at least where the F*** to start?? I did not have this problem with TC10, only when I upgraded to TC11
Thanks
So, in each of my modules, I was opening and closing Chrome. I decided to try taking out the close statement. Boom, no error. It still refreshes the page, which is fine. I don't know why this was a problem, but I got it to run all the modules concurrently

ReleaseHandleFailed was detected when debugging with MSTest

When I run my unit tests in debug mode, I get a recurrent exception like this:
I click "Continue" and then the test goes on without any problem. I have to do this around 10 to 15 times per test I want to debug. If I simple RUN the test, I get no exception whatsoever.
The test does well anyway, I click "Continue" on the recurrent exception and the test ends gracefully.
The exception has no stack trace. All the information I can get about it is in that screenshot. Even if I choose to "Copy MDA message to clipboard", it is the same as appears on the screenshoot.
The test is using Entity Framework Code First, and dropping and creating the database each time.
What could be the problem? I am not using any kind of encryption, but the test connects to the SqlServer and do some operations with it.
Thanks.
I got to disable the warning: http://msdn.microsoft.com/en-us/library/d21c150d.aspx
But I would like to know what is going on.
Cheers.

Test Suite Execution Jubula

I've been looking at Jubulas automated functional testing tool and following along with the tutorials, but I've become stuck before I ever even got off the ground with it. The user manual provided with the installation hasn't given any answers and I can't find anything in blogs dedicated to Jubula.
My question: I have my test suite, complete with test cases & steps, all set up and ready to go. I've mapped my objects using the editor. I've started the AUT and connected to it. All I have to do is start the test execution.... I click start.... nothing happens.
The Java application is visible (it's a simple calculator) and I can interact with it. But I don't get any dialogue boxes when I press start, which is what is supposed to happen according to the tutorial.
Has anyone tried Jubula and had this problem?
Two things come to mind.
If the "Start Test Suite" button is disabled, then it means you still have some sort of a problem stopping the Test Suite being executed (e.g. missing data or object mapping).
If the "Start Test Suite" button is enabled, then it might just be that you need to select a Test Suite to execute from the drop-down menu (opened by clicking on the small arrow next to the green button).
I had the same problem but at least I got a report about the tests failing. After I specified the JRE for the AUT (this setting is only shown if you click on the advanced or expert button) my tests finally started to work.
I think it's none of the previous answers. If you get a Failed-test report or your Start Test Suite button is disabled then it's pretty obvious. You can find those mistakes mentioned in documentation/blogs.
BUT! There are two errors which leave no traits; no error messages, nothing in logs.
1.) If there's a version incompatibility If you installed Jubula from a standalone installer or from Eclipse marketplace then it will work. But if you put it together for yourself then you cold mix up the components. I have an answer on these issues:
Jubula doesn´t recognize running AUT after upgrade to 2.0
2.) If you mislead your AUT-agent by starting an other .exe It has exactly the symptoms mentioned in the question. It's happening because the application has the Remote-Control (rc) plugin started in it and the AUT-agent is notified about the start. It tries to identify the process within the AUT-configs listed in the client's (testexec's) database and it misidentifies it.
You can solve this by adding each run-situation as a different AUT-config in your database. It's mostly about location in the filesystem: about where the exec process is launched from. I.e: debug-local (from Eclipse launch-bar), exported-local (for Delta-pack exports), QA-local (if you have PDE in your build) etc.

vs2010 unit tests aborting for no reason

We recently had our TFS 2008 server go down. It was rebuilt with TFS 2010 server. Now, when I selected VS unit tests and run, the first few are marked as "Aborted" and the others are "Not Executed"...
This happens without any input from me.
The unit tests were working fine before the crash.
What could be causing that?
Thanks.
I'm not sure but I have similar problem but on my local machine and with VS 2008. I cannot run some tests and have their status aborted with no reason. In the test run results I only have message "Test host process exited unexpectedly." Seems like with no reason. But I found more info on connect.microsoft.com site. The problem is my code rises StackOverflowException and it prevents the test from running. So fixing this problem heals my tests. Hope somebody it helps.
Unit test result only shows "aborted"/"test run error" for unrecoverable errors
I was getting this same issue, however in my case ALL tests were being skipped, and the error was reproducible on an empty test project, so code was ruled out.
Checking the EventViewer led me to the cause in my case; somehow the C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe.config file had been removed from my machine?!? I copied one from another machine here and I'm back in action.
Same thing happened to me and as Mike said it was because I had a stack overflow exception somewhere in my code. As soon as I fixed the SO exception the problem went away. Finding the SO exception was quite hard, but I just had to step through the code until I finally found a recursive call that would cause an SO.
I suffered a similar problem which stopped me completely.
To get round it, firstly I ran the NUnit test via debug (TEST --> Debug --> All Tests) which allowed me to step through.
The error was related to the use of Entity Framework. If your project under test uses Entity Framework then the NUnit project needs a reference to EntityFramework and EntityFramework.SqlServer (or whichever provider you're using).

Is there a way to freeeze Selenium-RC execution on error?

My Google-fu is weak and so I turn to the hive mind...
I have a Selenium script I originally developed in the IDE, which I am now trying to adapt to run on IE8 via Selenium-RC. I'm trying to debug an error where an element is not being found.
The problem is that as soon as the error occurs, the script exits and RC closes the browser. This makes it a bit hard to poke around with Firebug, etc, to see what is going on under the covers.
In the IDE, I could simply set a breakpoint. Is there a way to freeze the state of RC and the browser when an error occurs?
Any other ideas?
Thanks!
Depending on how you're running your RC tests, you could set a breakpoint in your IDE and run the test in debug mode. For example I use Eclipse to run tests using Java. Another option is to put a long pause in your test, just make sure you remove it again afterwards..!
I am running selenium rc tests as part of my test suite, so I just fire up --pdb (in python) and script pauses when exception occurs - before tearDown that closes the browser is invoked.
I have also had a plugin where I took a screenshot when something went wrong.
If you are using JUnit and SeleniumTestCase, you can add an empty tear down method to your test code which should prevent the browser from shutting down by overriding the base SeleniumTestCase tear down method. I use this on failing tests which I need to examine the resulting browser state after a failure.
In these situations I comment out the selenium.close() and selenium.stop() commands in my code which stops the browser from closing.
IIRC screenshot is only supported for firefox, so that won't help in your case.

Resources