Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

unit test

Former Member
0 Likes
691

how to perform unit test planning? what are the steps?Explain in detail?

1 ACCEPTED SOLUTION
Read only

ferry_lianto
Active Contributor
0 Likes
639

Hi Balu,

Unit Tests are defined and performed by developers. A process consists usually of several functions. Each of this function usually consists of "sub-functions" corresponding to a single method or a group of methods (if you are developing OO-based).

Unit Tests could be described as white-box tests whereas a normal tester (which should be not identical to the developer) will test entire functions (black-box tests).

You have to have the ABAP unit implemented in the code for this to be used...pls see the link from SAP help..

http://help.sap.com/saphelp_nw04/helpdata/en/a2/8a1b602e858645b8aac1559b638ea4/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c4/7c1440a1c32402e10000000a1550b0/frameset.htm

Regards,

Ferry Lianto

5 REPLIES 5
Read only

suresh_datti
Active Contributor
0 Likes
639

Pl check this

~Suresh

Read only

Former Member
0 Likes
639

Unit test plan shoudl be done with reference to the functional spec. Every step in the functinal spec should have a step in the unti test plan to make sure that it is tested throughly. Steps to go:

1. Divide the functinal spec into the most lowest level of functnality.

2. For each functionality, write steps in yoru test case to test it.

3. Also you will have to write negitive test case i.e. perform steps so that you get the correct error messages.

- Guru

Reward points for helpful answers

Read only

ferry_lianto
Active Contributor
0 Likes
640

Hi Balu,

Unit Tests are defined and performed by developers. A process consists usually of several functions. Each of this function usually consists of "sub-functions" corresponding to a single method or a group of methods (if you are developing OO-based).

Unit Tests could be described as white-box tests whereas a normal tester (which should be not identical to the developer) will test entire functions (black-box tests).

You have to have the ABAP unit implemented in the code for this to be used...pls see the link from SAP help..

http://help.sap.com/saphelp_nw04/helpdata/en/a2/8a1b602e858645b8aac1559b638ea4/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c4/7c1440a1c32402e10000000a1550b0/frameset.htm

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
639

Hi,

Steps to be followed for UTP.

UTP : Unit Test Plan. Testing the program by the developer who developed the program is termed as Unit Test Plan.

Two aspects are to be considered in UTP.

1. Black Box Testing

2. White Box Testing.

1. Black Box Testing : The program is executed to view the output.

2. White Box Testing : The code is checked for performance tuning and syntax errors.

Follow below mentioned steps.

Black Box Testing

1. Cover all the test scenarios in the test plan. Test plan is usually prepared at the time of Techincal Spec preparation, by the testing team. Make sure that all the scenarios mentioned in the test plan are coverd in UTP.

2. Execute your code for positive and negative test. Postive tests - to execute the code and check if the program works as per expected. Negative Test - Execute code to know if the code is working in scenarios in which it is not supposed to work. The code should work only in the mentioned scenarios and not in all cases.

White Box Testing.

1. Check the Select statments in your code. Check if any redundant fields are being fetched by the select statements.

2. Check If there is any redundant code in the program.

3. Check whether the code adheres to the Coding standards of your client or your company.

4. Check if all the variables are cleared appropriately.

5. Optimize the code by following the performance tuning procedures.

Using tools provided by SAP

1. Check your program using EXTENDED PROGRAM CHECK.

2. Use SQL Trace to estimate the performace and the response of the each statement in the code. If changes are required, mention the same in UTP.

3. Use Runtime Analyser and Code Inspector to test your code.

4. Paste the screen shots of all the tests in the UTP document. This gives a clear picture of the tests conducted on the program.

All the above steps are to be mentioned in UTP.

Regards,

Vara

Read only

Former Member
0 Likes
639

Hi Balu,

I would advice that you try to capture all the possible test scenario's which will get impacted due to the your changes in the program.

Also if you are making any change in a certain program,

use the test cases in the original(before change) program and modifed(after change) programs and consolidate the test results.

If its a new development, your test cases should capture the requirements given in functional specifications provided to you.

Once unit test is done, confirm the same with the functional person or the business side.

Cheers,

Vikram