background preloader

Junit

Facebook Twitter

Test web applications with Selenium RC. Unit testing frameworks, such as JUnit, let you test the code that runs on your servers.

Test web applications with Selenium RC

However, in a typical web application, that service code is just a small part of the total code in the application. Such an application can also have a lot of code that is really only testable using a tool that works with a browser to test the application. One of the more challenging aspects of testing web applications is testing the application's UI—the part of the application's code that is typically generated from HTML and JavaScript code. It runs in a browser, not in a server process, so it is only really testable from an Internet browser. Examples of this type of code include JavaServer Pages (JSP) pages, PHP code, and Ruby. This article introduces one tool in the community—Selenium—that you can use to create and automate web tests. Get to know Selenium RC Selenium RC is part of a suite of tools from the Selenium project. Downloading and installing Selenium RC. Creating test plan in Selenium.

Home > Programming / tutorials > Unit testing with Selenium September 7th, 2010 Vinay In our last Selenium – Web application testing tool , we had introduced selenium and explained different components of selenium.

Creating test plan in Selenium

In this post we will look at code examples. Selenium runs in Internet Explorer, Mozilla and Firefox on Windows, Linux, and Macintosh, Safari on the Mac, with plans to support Safari on iPhone soon. Selenium test scripts are portable, can be run from browsers (using Selenium IDE) or from JUnit(using Selenium RC) etc. We will discuss here on how you can easily create automatic test scripts using Selenium IDE and convert them to JUnit tests (which uses Selenium Remote Control) which can be added to your JUnit based automatic regression test suite. How to create a test plan in Selenium IDE Creating a test plan in Selenium IDE is very easy, so we will use it to create few simple tests to begin with. Install Selenium IDE 1.0.6 , a Firefox plugin. Start Selenium IDE from Firefox . line.

Development Art. SoapUI vs. JUnit. Open source soapUI tool has a number of benefits over developing test cases in Java using JUnit framework.

soapUI vs. JUnit

Some of these benefits include: Use of UI for creating/configuring tests. This makes it possible for non-programmers to develop tests, which means that testing of Web services can be performed by a QA/system test group. Auto-generation of test messages based on WSDL. Ability to externalize test data using property files. Overall, soapUI allows developers and testers to create tests quicker and also makes tests easier to manage and update.

However, one needs to understand shortcomings of this approach. soapUI uses its own Web services client. Technically, it may not be an issue in a majority of cases. In other words, using soapUI (or similar UI-based Web services testing tools, such as SOAPScope) does not allow you to understand all the details of how your Web service will be consumed in the real world. #7879 | April 30th, 2007 | jon Excellent points! Hi, nice post! Rock on!