Can any one tell me that how we go for the compare,unit
testing after changing requirement as per client request.
this is very helpful for me when u give suitable (coading)
exmple.
Answer / Avinash Singh Rawat
Unit testing after changing requirements can be performed by following these steps:
1. Update the code according to the new requirement.
2. Write or modify test cases that reflect the changes in the code.
3. Run the test cases and verify if the updated code passes all tests.
4. If any issues are found, fix the code and repeat the process until all tests pass.nHere is an example using Python:n```n# Original Codendef add(a, b):n return a + bnn# Unit Testnimport unittestnclass TestAdd(unittest.TestCase):n def test_add(self):n self.assertEqual(add(1, 2), 3)nn# Updated Code (after changing requirement to multiply instead of adding)ndef add(a, b):n return a * bnn# Unit Test after updating the codenclass TestMultiply(unittest.TestCase):n def test_multiply(self):n self.assertEqual(add(1, 2), 2)nnif __name__ == '__main__':n unittest.main()``
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain identify whether a call statement is a static or dynamic call?
what is Retro fitting ?
error code 7030 cpf7030 what is the level check error
what is the scope of commitment control?
what are the parameter we cannot use in procedure? How many instream we can write in single jcl? Can we call instream to catalog and catalog to instream?
88 level entry is for
7 Answers Accenture, Cognizant, EDS, Wipro,
what are the commands that frequently used in cl?
How will u give input data to cobol program apart from PARM & Instream data?
Explain host variables?
How is manual testing done in MF environment? what all are the steps to follow?
My program has an array defined to have 10 items. Due to a bug, I find that even if the program access the 11th item in this array, the program does not abend. What is wrong with it?
how do u create gdgs n vsam by using file-aid ?