Presentation is loading. Please wait.

Presentation is loading. Please wait.

SCRIPT RECORDING [webc mode].

Similar presentations


Presentation on theme: "SCRIPT RECORDING [webc mode]."— Presentation transcript:

1 SCRIPT RECORDING [webc mode]

2 GOALS OF TRAINING Script GUI(WEBC MODE) Script generation from CLI
Recording Script Structure Page Snapshots Script Testing/Debug trace Script generation from CLI                            

3 Hpd TOURS Its is a dummy application which is used for recording.
It acts as a real world application in which the following is done: Sign in where username and password can be anything. Search for a flight to desired destination. Search results are displayed and then any option is chosen. Confirm the flight, give the payment details and then logout.

4 PREREQUISITE Internet Explorer Version 6.0 or higher
Http Analyzer version 5.0 Netstorm Machine IP And Port number. Login Name And Password accordingly with the IP using. NetOcean IP where Hpd Tours application runs. Continued…

5 If you have Windows Vista OR Windows 7 then you have to disable protected mode of IE for recording. 
To disable this on IE go to Tools->Internet option ->Security Tab->Select Internet->Uncheck Enable Protected Mode option as shown.

6 Go through the flow manually using IE before starting the script recording.
This will help in understanding the flow which is to be recorded. The flow which is to be recorded is given below.

7 FLOW OF SCRIPT TO RECORD

8

9 PART 1 RECORDING

10 SCRIPT RECORDING Two ways to generate script are:
By nsu_gen_cscript from CLI By Recording from GUI

11 Procedure To Record The Script From CLI
Create an input file named as 1xx.inp. Command for creating filevi 1xx.inp

12 Do following entries in the file 1xx.imp
Enter 1 for Main Url & 2 for Embedded url. Enter the Http method like (GET , HEAD , POST etc) Enter the URL. Example: 1 GET 2 GET

13 Command for genrating c script from CLI
nsu_gen_cscript -s <ProjectName/SubProjectName> <ScriptName> -F <flowName> -f <InputFileName> Let ::ProjectNameQAT_Trainee SubProjectNameTrainee ScriptNamescript_c FlowNameflow_one InputFileName1xx.inp

14 Then the command used at CLI to create script in WEBC mode will be::
nsu_gen_cscript –s QAT_Trainee/Trainee script_c –F flow_one –f 1xx.inp The script will be recorded at path:: home/netstorm/work3/scripts/QAT_Trainee/Trainee/script_c

15 HOW TO RECORD THE SCRIPT FROM GUI
Login to a netstorm GUI from the browser. Then select script button from the GUI appeared. Click on start button and start recording. First pop up window will open where you have to give Script name, Url, Project and Sub project Name,Protocol Category(as WebC).

16 HOW TO START THE RECORDING
Go to script first

17 PRESS START RECORDING BUTTON

18 SCRIPT RECORDER WINDOW
Enter the scripts name “script_web_c”. Enter the URL. Enter the project name & sub project name Either you can choose Project-default,SubProject-default or Contact the Admin to create your own project or subproject Add the name of the flow

19 SCRIPT RECORDER WINDOW

20 Add The Name Of The Flow

21 PAGE 1 OF RECORDING Enter member name “hello” and password “world” and click on “login” button.

22 PAGE 2 OF RECORDING Click on “flights” button to find the flight.

23 PAGE 3 OF RECORDING Select the Departure City as “New York” and Departure Date will be default. Select the Arrival City “Paris” and Return Date will be default. Enter No. of Passengers as 2. Select Seating Preference as “Window”. Select Type of Seat “Coach”. Click on “continue…” button.

24 SNAPSHOT OF PAGE 3

25 PAGE 4 OF RECORDING Select third option for Flight.
Click on “continue…” button.

26 PAGE 5 OF RECORDING The First Name is “Tiger” and Last Name is “Scott” which are default values. Street Address and City/State/Zip are set by default. First name of Passenger Names is “Scott Tiger” which is default and enter second Passenger Name as “Red Bull”. Enter the Credit Card as “12345”. Enter the Exp. Date as “2014”. Click on “purchase flight” button.

27 SNAPSHOT OF PAGE 5

28 PAGE 6 OF RECORDING This is flight confirmation page to confirm your flight. Click on “signoff” button on left side to logout.

29 PAGE 7 OF RECORDING This is logout page which confirms that you have successfully logout.

30 FINISHING THE RECORDING
To finish the recording click the ‘stop’ button on script management window which will save the script. Stop Recording Button

31 SAVING SCRIPT

32 RECORDED SCRIPT PAGE NAMES

33 PAGES NAMES Above are the default page names which comes automatically from Query String, selecting only the last part of the URL. If two pages have same name then it will be differentiated by pagename_2 for second page, pagename_3 for third page and so on. Example: -FindFlight - FindFlight_2 - FindFlight_3, of recorded script.

34 Its highly recommended to change the page name after recording .
If page names are changed after parameterization or check points it’s a limitation of product that it will not reflect changes in script. If the change page screen gets lost, it can be changed from Edit option-> Page(s). After entering the new page names, click the change button and then the new page names will be saved.

35 NEW PAGE NAMES By clicking on change button we canchange the name of pages

36 PassengerPaymentDetail
You can directly copy the names from this table to change the pages names. Old Page Names New Page Names index_html Home login Welcome reservation FindFlights findflight SearchResults findflight_2 PassengerPaymentDetail findflight_3 FlightConfirmation welcome Logout

37 Recorded script (scripts_web_c) will shown in script management under your project and sub project.

38 Add Another Flow In The Same Script
Give the url and new flow name “flow1” Click here reCORD THE NEW FLOW AS DESCRIBED ABOVE AND SAVE IT

39 PART 2 SCRIPT STRUCTURE

40 SCRIPT FILES exit_script.c flow2.c init_script.c registration.spec
runlogic.c

41 ADDED SCRIPT FILES

42 flow1.c All main url and embeded are shown on this page.
Following are added on this page Page think time Transactions Check points

43 Screen Shot Of flow1.c

44 Screen Shot Of init_script.c
Any declaration can be done here also transactions can be applied here.

45 Registration.spec We use all parameters at this page:
Such as: File Parameters Search Parameter Random String Parameter File Index Parameter etc.

46 Screen Shot Of registration.spec

47 Screen Shot Of runlogic.c
Flows of the scripts can be ordered here.

48 Screen Shot of exit_script.c

49 DUMP FILE 5) Dump File: It contains:-
Header file: It contains the request and response of each pages. Index file: It contains URL’s of all the pages. Pages.html PagesList.html

50 TEMP FILE 6) Temp File: It contains:-
changed_url.txt: This file contains the url whose names are parsed. logs: This file contains Script Recorder_debug.log and script_Recorder_error.log

51 PART 3 PAGE SNAPSHOTS

52 SNAPSHOTS OF RECORDED SCRIPT
Snap shot Button

53 HOME PAGE SNAPSHOT

54 WELCOME PAGE SNAPSHOT

55 FIND FLIGHT PAGE SNAPSHOT

56 SEARCH RESULT PAGE SNAPSHOT

57 PASSENGER PAYMENT DETAIL PAGE SNAPSHOT

58 FLIGHT CONFIRMATON PAGE SNAPSHOT

59 LOGOUT PAGE SNAPSHOT

60 REQ/RES FROM SNAP SHOT Click on page number of each page from snapshot to check the request and response of each page. You can check the main url’s which are followed by the embedded url’s.

61 REQ/RES FROM SNAP SHOT

62 PART 4 SCRIPT TESTING

63 NEED OF SCRIPT TESTING Script Testing is useful for quick test of recorded script. By Script Testing you can easily look at the flow, how script is recorded. It should be noted that Script testing is not meaningful for those scripts which are taking dynamic values. Example account no., username and password etc.

64 Go to script management and click “Test Script” button to test the script which you have recorded.

65 DEBUG LOG

66 THANK YOU


Download ppt "SCRIPT RECORDING [webc mode]."

Similar presentations


Ads by Google