Archive for 'Unit Test'

Test cases are really important for ensuring quality of products. The following are the fields that are needed for effective test case creation.

1. Test case id  – a unique id to identify each test case

2. Unit to test – what is being tested in the test case

3. Assumptions – what are the pre requirements or assumptions that are made in the test case

4. Test data – variables and datas which are given as input for the test case

5. Steps to be executed – steps that are needed to execute to perform the test case

6. Expected result – what is the expected result of the test case. i.e., how the product is expected to behave in the test case

7. Actual result – what is result of the test case. i.e., how the product actually behave in the test case

8. Pass/Fail – based on the expected result and the actual result, where the product passed or failed in the test case

9. Comments – comments of the test case to identify the real cause of failure or success

Robolectric is a unit test framework that de-fangs the Android SDK jar so you can test-drive the development of your Android app. Tests run inside the JVM on your workstation in seconds. With Robolectric you can write test simple and efficient

Advantages:
Fast and responsive
Easier testing just using the JVM
Highly efficient and productive

http://pivotal.github.com/robolectric/user-guide.html