<p>The company I'm currently working for is using <a href="http://selenium.openqa.org/" rel="noreferrer">Selenium</a> for Uniting-Testing our User Interface. What do you use to Unit-Test your Web UI and how effective do you find it? </p>

[{'answer_id': 7464, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': "<p>We use Selenium Core, but are switching gradually to Selenium RC which is much nicer and easier to manage. We have written lots of custom code to make the tests run on our Continuous Integration servers, some of them in parallel suites to run faster. </p>\n\n<p>One thing you'll find is that Selenium seems to restart the browser for each test (you can set it not to do this, but we got memory problems when we did that). This can be slow in Firefox, but is not too bad in IE (one time I'm thankful for Bill Gates's OS integraion).</p>\n"}, {'answer_id': 7465, 'author': 'Jay Mooney', 'author_id': 733, 'author_profile': 'https://Stackoverflow.com/users/733', 'pm_score': 2, 'selected': False, 'text': "<p>We are using QuickTestPro.  So far it is effective, but the browser selection is limited.  The nicest part is the ability to record your browser's activity, and convert it into a scriptable set of steps.  There is also a nice .Net addin so if you have any validation code you need to do for the different stages of your test, you can write methods in an assembly and call them from your script.</p>\n"}, {'answer_id': 7490, 'author': 'TheSmurf', 'author_id': 1975282, 'author_profile': 'https://Stackoverflow.com/users/1975282', 'pm_score': 3, 'selected': False, 'text': "<p>Well, if you've designed your application properly, you won't have scads of logic inside the UI anyway. It makes much more sense to separate the actual work getting done into units separate from the UI, and then test those. </p>\n\n<p>If you do that, then the only code in the UI will be code that invokes the backend, so simply testing the backend is sufficient.</p>\n\n<p>I have used NUnit ASP in the past (at my job), and if you insist on unit testing your UI, I would strongly advise you to use ANYTHING but NUnit ASP. It's a pain to work with, and tests tend to be invalidated (needing to be revised) after even the most minor UI changes (even if the subjects of the tests don't actually change).</p>\n"}, {'answer_id': 7500, 'author': 'Mike Stone', 'author_id': 122, 'author_profile': 'https://Stackoverflow.com/users/122', 'pm_score': 2, 'selected': False, 'text': '<p>We have been using <a href="https://github.com/pivotal/jsunit" rel="nofollow noreferrer">JSunit</a> for a while to do unit tests... it may not be the same kinds of tests you are talking about, but it is great for ensuring your JavaScript works as you expect.</p>\n\n<p>You run it in the browser, and it can be set in an Ant build to be automatically run against a bunch of browsers on a bunch of platforms remotely (so you can ensure your code is cross-browser as well as ensure the logic is correct).</p>\n\n<p>I don\'t think it replaces Selenium, but it complements it well.</p>\n'}, {'answer_id': 20754, 'author': 'jonezy', 'author_id': 2272, 'author_profile': 'https://Stackoverflow.com/users/2272', 'pm_score': 4, 'selected': True, 'text': "<p>We use Watin at my place of employment, we are a .net shop so this solution made a lot of sense.  We actually started with Watir (the original ruby implementation) and switched after.  It's been a pretty good solution for us so far</p>\n"}, {'answer_id': 24549, 'author': 'Ryan Doherty', 'author_id': 956, 'author_profile': 'https://Stackoverflow.com/users/956', 'pm_score': 2, 'selected': False, 'text': '<p>I\'ve used <a href="http://wtr.rubyforge.org/" rel="nofollow noreferrer">WATIR</a>, which is pretty good. I liked it because it\'s Ruby and allows for testing interactivity, available elements and source code parsing. I haven\'t used it for a while but I assume it\'s gotten better.</p>\n\n<p>It\'s supposedly being ported to Firefox and Safari, but that\'s been happening for a while now.</p>\n'}, {'answer_id': 35381, 'author': 'Clayton', 'author_id': 1449, 'author_profile': 'https://Stackoverflow.com/users/1449', 'pm_score': 2, 'selected': False, 'text': '<p>Check out <a href="http://webtest.canoo.com/webtest/manual/WebTestHome.html" rel="nofollow noreferrer">Canoo Web Test</a>.  It is open source and built on the ANT framework.</p>\n\n<p>I spent some time working with it for a graduate course on Software QA and it seems to be a pretty powerful testing tool.</p>\n'}, {'answer_id': 47422, 'author': 'Michael OK', 'author_id': 4637, 'author_profile': 'https://Stackoverflow.com/users/4637', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://selenium-grid.openqa.org/" rel="nofollow noreferrer">Selenium Grid</a> can run your web tests across multiple machines in parallel, which can speed up the web testing process</p>\n'}, {'answer_id': 47430, 'author': 'Erlend Halvorsen', 'author_id': 1920, 'author_profile': 'https://Stackoverflow.com/users/1920', 'pm_score': 2, 'selected': False, 'text': '<p>I mostly use <a href="http://cubictest.openqa.org" rel="nofollow noreferrer">CubicTest</a>, which is an eclipse plugin that lets you define tests graphically. It can export/run tests through several libraries, including watir and selenium. Most people just use the Selenium runner though.</p>\n\n<p>Full disclosure: I\'m one of the developers, so I\'m kind of biased :)</p>\n\n<p>Take a closer look here: <a href="http://cubictest.openqa.org/" rel="nofollow noreferrer">cubictest.openqa.org</a></p>\n\n<p>-Erlend</p>\n'}, {'answer_id': 72681, 'author': 'noah', 'author_id': 12034, 'author_profile': 'https://Stackoverflow.com/users/12034', 'pm_score': 2, 'selected': False, 'text': "<p>Selenium is for Integration testing, not Unit testing. It's a subtle, but important difference. The usage I usually see is for sanity checking a build. i.e., have a test that logs in, a test that (for example) submits a story, makes a comment, etc.</p>\n\n<p>The idea is that you're testing to see if the whole system is working together before deployment, rather than have a user discover that your site is broken.</p>\n"}, {'answer_id': 92250, 'author': 'Peter Bernier', 'author_id': 6112, 'author_profile': 'https://Stackoverflow.com/users/6112', 'pm_score': 4, 'selected': False, 'text': "<p>I'm a huge fan of Selenium. Saying 'unit-testing your web ui' isn't exactly accurate as some of the comments have mentioned. However, I do find Selenium to be incredibly useful for performing those sort of acceptance and sanity tests on the UI.</p>\n\n<p>A good way to get started is using Selenium IDE as part of your development. Ie, just have the IDE open as you're developing and write your test as you go to cut down on your dev time. (Instead of having to manually go through the UI to get to the point where you can test whatever you're working on, just hit a button and Selenium IDE will take care of that for you. It's a terrific time-saver!)</p>\n\n<p>Most of my major use case scenarios have Selenium RC tests to back them up. You can't really think of them as unit-tests along the lines of an xUnit framework, but they are tests targetted to very specific functionality. They're quick to write (especially if you implement common methods for things like logging in or setting up your test cases), quick to run, and provide a very tight feedback loop. In those senses Selenium RC tests are very <em>similar</em> to unit-tests.</p>\n\n<p>I think, like anything else, if you put the effort into properly learning a test tool (eg, Selenium), your effort will pay off in spades. You mention that your company already uses Selenium to do UI testing. This is great. Work with it. If you find Selenium hard to use, or confusing, stick with it. The learning curve really isn't all that steep once you learn the API a little bit.</p>\n\n<p>If I'm working on a web app, its rare for me to write a significant amount of code without Selenium RC tests to back it up. That's how effective I find Selenium. :) (Hopefully that'll answer your question..)</p>\n"}, {'answer_id': 101373, 'author': 'macnamee', 'author_id': 15465, 'author_profile': 'https://Stackoverflow.com/users/15465', 'pm_score': 2, 'selected': False, 'text': '<p>We use Visual Studio 2008 Tester Edition. </p>\n\n<p><strong>Pros:</strong>\nVery good at capturing user interaction</p>\n\n<p>Captures Ajax calls</p>\n\n<p>It is very easy to map user input to a database, XML or CSV file</p>\n\n<p>The captured test can be converted to C# for more control</p>\n\n<p>The same tests can be used for load testing and code coverage</p>\n\n<p><strong>Cons:</strong></p>\n\n<p>VS2008 Tester Edition is a seperate SKU from the normal Developer Edition, which means extra cost</p>\n\n<p>You may be alergic to Microsoft ;-)</p>\n\n<p>We have used it very effectively on projects, however there a lot of effort involved in keeping tests up to date, every time you change a screen the test may need to be re-recorded</p>\n\n<p>We tend to keep the tests short and sharp, do one thing and get out instead of recording 10 minutes worth of clicking around in a single test.</p>\n\n<p><strong>We have a few standard UI test types:</strong></p>\n\n<p><strong>Menu Test:</strong> Log in as a specific user (or user type/role) and make sure all the required menu items are available</p>\n\n<p><strong>Validation Test:</strong> Open a page and click save without entering any data, ensure that all the validation warnings appear. Complete required fields one at a time and check that the warning messages disappear when they are supposed to.</p>\n\n<p><strong>Search Test:</strong> Search using data from your database or a data file and ensure the correct data is returned by the search</p>\n\n<p><strong>Data Entry Test:</strong> Create new recrords from a data file, cleanup the database to allow tests to run multiple times</p>\n\n<p>UI Testing is quite time consuming but the comfort feeling you get when a few hundred tests pass before you release a new version is priceless.</p>\n'}, {'answer_id': 434004, 'author': 'orip', 'author_id': 37020, 'author_profile': 'https://Stackoverflow.com/users/37020', 'pm_score': 0, 'selected': False, 'text': '<p>We use <a href="http://watin.sourceforge.net/" rel="nofollow noreferrer">WatiN</a> for system testing, and <a href="http://docs.jquery.com/QUnit" rel="nofollow noreferrer">QUnit</a> for JavaScript unit testing.</p>\n'}, {'answer_id': 3296350, 'author': 'Vivek Kodira', 'author_id': 16485, 'author_profile': 'https://Stackoverflow.com/users/16485', 'pm_score': 0, 'selected': False, 'text': '<p><a href="http://www.molyb.org/confluence/display/molyb/Home" rel="nofollow noreferrer" title="Molybdenum">Molybdenum</a> is built over Selenium and has some additional features.</p>\n'}, {'answer_id': 10810021, 'author': 'Taylor', 'author_id': 711598, 'author_profile': 'https://Stackoverflow.com/users/711598', 'pm_score': 1, 'selected': False, 'text': '<p>We currently use <a href="http://microfocus.com/products/silk/silktest/index.aspx" rel="nofollow">Silk4J</a> - a Java centric approach to testing Web UI. It can test Flash, Flex, AIR, Silver Light, Win32, HTML, and a few other applications.</p>\n\n<p>Since Silk4J can control Win32 apps it can control browser dialogs directly, which is a step above what Selenium can control and is especially useful for download prompts.</p>\n'}]
['https://Stackoverflow.com/questions/7440', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/889/']