cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

hi all,

how to write unit test case?

i have a selection-screen which contain some select-options and parameter options.

for example if i have a

select-options: s_orderno for vbak-vbeln.

and i have to validate the s_orderno we have to check the order values in vbak.

so how can we write a unit test case for this validation?

0 Likes
View Entire Topic
Former Member
0 Likes

Soemthing like this.

Test case Heading: Check if the entered Order exist in the system.

Test Case 1: Order No which exist in SAP is entered on selection screen.

Expected Result: Order no should be validated with VBAK. And if record exist, it should continue the process.

Actual: Result: Process continued.

Test Case 2: Order which does not exist in SAP is entered on selection screen.

Expected Result: Error message 'Pls enter valid Order' should be displayed in selection screen.

Actual Result Result: Error message is displayed.

Are you looking for something like this?

Former Member
0 Likes

hi Ashish,

thanks for u r answer. how it looks in the real time?

it is same as u answered? or in any other way? if there is anyother way plz giveme details.

Former Member
0 Likes

Hi Prashanth,

It will be the same way as Ashish gave,probably couple of them more testing scenarios..

Former Member
0 Likes

i mean to ask u is whether we write the test cases theoretically as u written one by one <b>or</b> there is any graphical representation is there?

Former Member
0 Likes

Hi,

Generally it is theoritically written,but some times there may be screen shots also.

Former Member
0 Likes

Prashanth,

We create all test cases as i have suggested. Expected result is what is expected from that case.

In each case you need to provide test data used to perform the test. Based upon this data and test, expected result is derived.

and actual result column is filled when you use this test case and test your code.

Expected result is theoritical but Actual result is the outcome of the test.

Usually develoeprs do not prepare test cases. These are provided by Functional Consultant which we as developers use during testing of the programs.

Former Member
0 Likes

Hi Ashish,

I am in SD and unaware of SD testing. I know we have test plans,test cases and scripts.

What will each one contains, i mean what exactly test plans have? Can you give overview of how testing process takes place.

Regards

Potluri