How to map test cases with Automation script?
Please explain in details.With example

Thanks for your co-operation(In Advance)



How to map test cases with Automation script? Please explain in details.With example Thanks for ..

Answer / niroj

Don't do a direct mapping with the TCs. Because it will be
very hard code, maintain and the test cases writing may
differ from person to person.
Hence,to this you need to first simplify the test cases with
some basic keywords like OPEN PoPup, OPEN WINDOW, ENTER
value AND PRESS <Enter>, MATCH value, CONNECT DB name,
EXECUTE QUERY(SELECT ...), WAIT secs etc. which you think
can completely represent any testing you are doing and other
people also can easily follow the same standard.
Put all these step wise perfect format in a file(better to
put in a Excel doc)

Now you can check your KEY words which can be read from the
Excel doc and match those using Regular Pattern Matching.
After mapping with the instructions we can execute the exact
codes in your automation script.

Example: Suppose I am going automate Web Page application.
Test cases step in original format:(i.e in an excel sheet)
I am using PERL pattern matching Standards...
1) Open the site yahoomail | Req: The page should be loaded
correctly
2) Enter your yahooid | Req: User should be able to enter
his/her name in the text field
etc...

Mapping Steps:(Re-writing TCs in a excel sheet)
1) OPEN PAGE "https://login.yahoo.com/" | Req: MATCH IMAGE
"Sign in to Yahoo!"
2) PRINT name@yahoo.com IN "Yahoo! ID" TEXTFIELD | Req:
EDITABLE FIELD
3) PRESS <Tab> | Req: BLIING CURSOR IN "Password:" FIELD
etc...
END_ME

Automation Coding Stage:
========================
Var Step=Read 1(Step column from Excel)
While Step <> END_ME
{
Var Task=ReadExcel [Step]["TASK_COL"]
Var Req=ReadExcel [Step]["REQ_COL"]
Var Step=ReadExcel [Step++]["Step_Col"]

If [ %Task% =~ /^\s*OPEN\s+PAGE\s+(\S+)/i ]
{
RUN IE
Wait Window to open
ENTER $1
Wait the page to load

If [ %Req% =~ /^\s*MATCH\s+IMAGE\s+(\S+)/ ]
{
Wait the image for searching
Set timeout=fewsecs
If matched:
Write Passed to a file
Else
Write Failed to a file
EndIf
}
...................
....................

}
..........................

}


========================================
Better you use a tool like WinAutomation, MacroSchedular etc
for easy mapping

Regards,
Niroj Kumar Pattnaik
R&D In Software Testing

Is This Answer Correct ?    7 Yes 0 No

Post New Answer

More VB Script Interview Questions

can any body give the code to write the function for given suppose user login with usrer id and pwd to yahoomail.after cliking "sign in"if it is valid user id the next page will display userid'message box.( Note u have to use excel sheet to retrive the userid's data)

3 Answers   Bally Technologies,


Write a program using Java Script / VBscipt that checks if two matrices have identical values in all the elements

1 Answers   Ignou,


join all the array values without using join function?

1 Answers   CSS Corp,


In the Web page we have a table link, if we click on that link all the contents under that link will be sorted (asscending/Descending). Now i want to check in which order the list is ? for that i need to get the data in to some var How can i get that cells data?

0 Answers   Nous,


What methods are used to create text files and open text files in the vbscript language?

0 Answers  






What is the difference between a dictionary and an array?

0 Answers  


Explain the support of asp for vb script functionality?

0 Answers  


when we use filter funtiom invb script(QTP)

0 Answers   TCS,


How to add actions in driver script to run those actions in QTP?

0 Answers  


Which operator is used to perform the comparison among 2 operands in the vbscript language?

0 Answers  


regular expression that will recognize a browser as long as its name property starts with mybrowser

0 Answers   Banking,


Here in my automation tool, i am retreiving some values and i need to store this values in the excel. How can i achieve this?. We are using VBA as scripting language. please let me know if you require any further inputs.

1 Answers  


Categories