Software Testing Essay Example

SOFTWARE TESTING 4

Software Testing

Purpose of testing tools such as JUnit and TestNG

JUnit and TestNG are software test tools that that are used in the testing of software applications developed based in the Java platform. They serve an important purpose in the identification of bugs and errors associated with the developed software. Ron (2005) expounds the need for software testing at early stages. In his book software, testing Ron (2005) argues that identification of errors or bugs in software and fixing of the errors is much cheaper than fixing it at later stages. Testing software ensures that a high quality product is achieved at the end.

The primary purpose of software testing is to verify that the functionality and expectation of the system are in line with the requirement specification defined. Though it is improbable to uncover every software bug that exist in any system, testing however aids in realizing vulnerabilities and other situations that can cause negative effects on the usability and maintainability of the software once deployed(Ron 2005).

Testing tools such as JUnit and TestNG are instrumental therefore in testing processes. This software provides an automated means that enables the testing process to achieve the efficiency desired in any task. They facilitate faster as well as ensure effective testing.


Benefits of using testing tools such as JUnit or TestNG compared to the manual testing process

Testing tools offer an automated process to testing software. Automation is key to realization of faster task performance; this is also realized in this case of automated software testing. Since the automated process is faster, it allows test cases to be run repeatedly in a faster manner, which cannot be realized in the manual process. The huge amount of time taken to run test cases in manual process can be a setback to the test process. At any particular time, the software developed has to be considered to run on different platforms; therefore testing must be done on all those platforms putting into consideration the various configurations that could exist. Automated testing allows a faster efficient and easy process to the process. Testing can also be done on a constantly changing code by running regressions on it. Finally, testing by use of TestNG and JUnit allows simultaneous testing to be done on different platforms or configurations this reducing the overall test time, which cannot be achieved in manual testing.


Similarities and differences between JUnit and TestNG

Similarities

JUnit as well as TestNG implement exception tests in their operations. Exception implies tests that are thrown by unit tests of any particular software tested. On top of that, both implement ignore tests as well. In some cases, software testing is done on some modules or sample code to provide a representative of the whole software (Kent, 2004). JUnit and TestNG both have implementations that enable determination of the possibility of ignoring a unit test or not. During software testing, the tools used have an estimation technique as to the time it takes the unit to complete executing. However, in some instances testing might take longer than expected by the application. To resolve this problem, the software application tools do a time test automatically. Time test means that if a unit test takes longer than the expected duration to run then the test is terminated and the test reported as failed. Both the TestNG and JUnit have this capability during testing(Smart, 2008).

Differences

(Smart, 2008). If at any time a failure in one test case does not allow performances of tests in other cases, the group of cases affected is skipped. JUnit however do not offer this ability. Failure in one test case can cause a report of failure on the subsequent dependent test cases (Kent, 2004). Furthermore, TestNG allows grouping of specific subsets of the test suite, which can then be run separately if, need be. Initially JUnit did not allow it however, in its latest version JUnit have incorporated categories feature, which allows groupings. Though this is the case, it is much more complex to group suites in subsets and then run them separately in JUnit compared to TestNGTestNG can handle dependency between test cases pretty well. A failure in one test case that is dependent on another test case does not cause the other test case to fail (Smart, 2008).

Reference

Kent, B. (2004). JUnit pocket guide. New York, NY: O’Reilly Media, Inc.

Ron, P. (2005). Software testing. California, CA: Sams

Smart, J. (2008). Java Power Tools‎. New York, NY: O’Reilly Media, Inc.