Information Technology Reference
In-Depth Information
This type of test is also commonly referred to as an integration
test. The difference between this type of test and a system test is that
integration tests (or component tests or subsystem tests) don't always
exercise a publicly preferable API. For example, a system test would
exercise a Web application through its Web pages, but a component
test would exercise the business layer under the application Web pages.
Automate System Tests
System tests exercise a complete software system and therefore
require a fully installed system, such as a servlet container and associ-
ated database. These tests verify that external interfaces like Web
pages, Web service end points, and GUIs work end to end as designed.
System tests have the tendency for lengthy runtimes in addition to pro-
longed set-up times. But when you are successfully running your auto-
mated unit and component tests, you are identifying a number of
lower-level issues beforehand and you simply plan intervals for run-
ning this longer test, perhaps as part of a secondary integration build or
even during off-hours, like overnight.
System tests are fundamentally different than functional tests,
which test a system much like a client would use the system. For
example, in Listing 6-5 the test mimics a browser by manipulating the
site via HTTP; however, this test doesn't use a browser. A framework
like Selenium, 2 which drives a browser, can be used to create func-
tional tests. You still perform automated and manual functional testing
at another interval after completing automated systems tests—one
does not preclude the other.
Listing 6-5 contains a sample JWebUnit test case, which attempts
a Web site login and then verifies whether the attempt was successful.
While it may not be obvious in this code, the entire system (a servlet
container and a database) has to be installed and running for this test
case to work. Note that the setup here isn't in the test case but is part of
a larger aspect of the build.
2. Selenium is a Web-based, cross-browser functional testing tool available at
www.openqa.org/selenium/.
 
Search WWH ::




Custom Search