Unit Test

1. Assert.assertEquals(expected, actual, delta)

While delta is the maximum difference(delta) between expected and actual for which both numbers are still considered equal.

eg:

Assert.assertEquals(0.0012f, 0.0014f, 0.0002); //true
Assert.assertEquals(0.0012f, 0.0014f, 0.0001); //false

2. positive testing&negative testing

https://www.softwaretestingclass.com/positive-and-negative-testing-in-software-testing/

Positive Testing:

Positive Testing is testing process where the system validated against the valid input data. In this testing tester always check for only valid set of values and check if a application behaves as expected with its expected inputs. The main intention of this testing is to check whether software application not showing error when not supposed to & showing error when supposed to. Such testing is to be carried out keeping positive point of view & only execute the positive scenario.Positive Testingalways tries to prove that a given product and project always meets the requirements and specifications. Under Positive testing is test the normal day to day life scenarios and check the expected behavior of application.

Negative Testing:

Negative Testing is testing process where the system validated against the invalid input data. A negative test checks if a application behaves as expected with its negative inputs. The main intention of this testing is to check whether software application not showing error when supposed to & showing error when not supposed to. Such testing is to be carried out keeping negative point of view & only execute the test cases for only invalid set of input data.

Last updated

Was this helpful?