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.
Related
I was debugging a GoLang program. I set break points and run the debugger. But the break points only works the first time I run the debugger and failed in the second, the third, and all following debugging whatever I do. I cancelled them and reset them, I close the debugging window and open a new one, I change the settings in the "Breakpoints" tool window. All these didn't work at all.
What's the problem?
Update, this has been fixed in the latest release of the plugin, please check it out
This is a well known problem and it lies in delve not the plugin itself. Please see this this issue for further reference.
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
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.
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.
I’m having trouble to find a bug in my application.
The problem is random and don’t throw any error. The web site just keeps loading and loading and eventually gets a timeout.
Is a web application using MVC 3 in VS 2010 Pro.
Some time ago, I see a friend to write something in the url, and gets all the trace of the program…
Sadly, I don’t remember what the command was.
Anyone has an idea of what command is it?
Any suggestion on what to use to debug?
Thanks!
Edgar.
UPDATE!
I finally found the command... is trace.axd
But Its behave the same way... sometimes load without problems and show me all the trace info... and sometimes.. it keep loading and loading...
Maybe something related with IIS?
Turn on break on every thrown exception, run your application in debug mode and wait. If it executes too long then pause application and check where you are or wait for exception that is handled somewhere.
Your friend may have had something like the following built into his application, to dynamically set tracing on.
Trace.IsEnabled = Request.QueryString["trace"] != null ? true : false;
This provides info only if the page is fully loaded. It's probably best if you use the VS debugger to step through code.
If all you loops look ok, investigate code that could result in circular references or deadlocks. These can be difficult to spot sometimes, look for functions or constructors that require results from a calling class. So code that needs the result from a function which in turn need results from the first.
Well, this sounds like you have an infinite loop somewhere.
Look at the code that runs when you visit the URL that gives you trouble. See if there is any loops in there (for/while). If yes, see why if they never exit. You can do this by putting a breakpoint inside the loop and examining its behavior over the iterations.
in MVC the bugs you do not see are most of time (especially in Razor and Ajax work) view compile errors. Sometimes syntax bugs on views just does not show that view and do not stop working.
Try that:
put a breakpoint in view.
If program stops in there it means this view is working. Othervise there is a syntax error in this view.
Another way to see some bug information more than in visual studio is use browser tools.
I use google Chrome. Just open developer tools in it. Open network. And do your request. It will list the requests and responses. Click the response and see the information. After style (it is written Verdana etc) read exception details. Sometimes there is more information :)
I am using MVC 3 in Razor from start. So this is a small bug in asp.net mvc.