JAVA UNIT TESTING
Project detail
Mission:
You were asked by your manager to execute complete unit test (white box testing) for StringUtils Java class, written by a developer who suddenly left the team. You are provided the source code (StringUtils.java) and you are to write JUnit test cases for it. You are to assume that code description is correct for what each method is supposed to do and the code is supposed to match it.
Objectives:
Define, implement, and execute complete and thorough unit test on the given Java class (StringUtils.java).
Outline of Steps:
1. Fill out the Unit Test approach section in the template, explaining what unit test is all about and it’s most important criteria. Address all the questions completely and thoroughly.
2. Design tests for each method to meet 100% code coverage and reasonable data coverage. Describe these tests in the document using template format given. For this project you want to test methods against the code comments and the code itself. The code comments are assumed to be correct and the code may or may not be correct. Your goal is for your testcases to find defects in the code
3. Implement unit test cases in JUnit (e.g. StringUtilsTest.java)
4. Run the unit test cases and document the actual results in the report for each test case
5. Identify any defects you found running the JUnit and describe them in the report (using the template format) in section 2. Note: You should find a few defects.
6. Submit both the report file and JUnit source code (java file).
7. All your tests must be in a single java file