Hot answers tagged

6

1 may be necessary, but it's also possible to handle it by executing some javascript. For example, if the ajax page is using the jquery library, you can do this: bool isAjaxFinished = ((IJavaScriptExecutor)webDriver).ExecuteScript("return jQuery.active == 0") 4 and 5 on your list don't seem necessary and may actually be counter-productive. Selenium does ...


3

The insertion of Thread.Sleep() is typically indicative of a race condition in your test and your test is running out of sync with the thing is it testing. One suggestion may be to insert a polling loop to wait for the redirect, or an event to indicate the redirect has happened. See http://www.testingmentor.com/imtesty/?p=652 and read the comments for ...


2

If you are using SpecFlow look at the Tags Tags description where placing a specific tag before your Scenario allows you to run the specific ones you want. I use @test or @dev for specific User/Functional Tests and when using my NUnit Driver I put in the tag with the /include option. This links in to the SpecFlow feature files such that the following case ...


1

Just a comment, no matter how many documents are written for developers about producing testable code, the code will still not be testable, until developer tries to write some automation for his code. IMHO, spending half a day when dev sits side by side with a person who knows how to use one of the UI automation frameworks and trying to write some automation ...


1

Overall best practices for testability is difficult, since that could involve whether the code "hides" defects (e.g. race conditions causing intermittent threading issues or difficult corner case issues). Usually testability goes hand in hand with good development practices: well documented code, following a coherent coding style standard, and good ...


Only top voted, non community-wiki answers of a minimum length are eligible