The document discusses Winrunner training objectives including understanding automated testing benefits, learning how to use Winrunner features, and creating test scripts. It describes benefits of automated over manual testing such as being faster, more reliable, and repeatable. The Winrunner testing process is outlined including creating the GUI map, developing tests, debugging, running tests, and viewing results. Recording modes and working with other testing tools are also summarized.
Abstract Face recognition is a form of computer vision that uses faces to identify a person or verify a person’s claimed identity. In this paper, a neural based algorithm is presented, to detect frontal views of faces. The dimensionality of input face image is reduced by the Principal component analysis and the Classification is by the neural back propagation network. This method is robust for a dataset of 300 face images and has better performance in terms of 80 – 90 % recognition rate.
Virtual reality (VR) is a simulated experience that can be similar to or completely different from the real world. Applications of virtual reality can include entertainment (i.e. video games) and educational purposes (i.e. medical or military training). Other, distinct types of VR style technology include augmented reality and mixed reality, sometimes referred to as extended reality or XR.
HYPERSPECTRAL IMAGERY CLASSIFICATION USING TECHNOLOGIES OF COMPUTATIONAL INTE...IAEME Publication
Texture information is exploited for classification of HSI (Hyperspectral Imagery) at high spatial resolution. For this purpose, framework employs to LBP (Local Binary Pattern) to extract local image features such as edges, corners & spots. After the extraction of LBP feature two levels of fusions are applied along with Gabor feature & spectral feature, i.e. Feature level fusion & Decision level fusion. In Feature level fusion multiple features are concurred before pattern classification. While in decision level fusion, it works on probability output of each individual classification pipeline combines the distinct decisions into final one. Decision level fusion consists of either hard fusion, soft fusion method. In hard fusion we consider majority part & in soft fusion linear logarithmic opinion pool at probability level (LOGP). In addition to this, extreme learning machine (ELM) classifier is included which is more efficient than support vector machine (SVM), used to provide probability classification output. It has simple structure with one hidden layer & one linear output layer. ELM trained much faster than SVM.
Abstract Face recognition is a form of computer vision that uses faces to identify a person or verify a person’s claimed identity. In this paper, a neural based algorithm is presented, to detect frontal views of faces. The dimensionality of input face image is reduced by the Principal component analysis and the Classification is by the neural back propagation network. This method is robust for a dataset of 300 face images and has better performance in terms of 80 – 90 % recognition rate.
Virtual reality (VR) is a simulated experience that can be similar to or completely different from the real world. Applications of virtual reality can include entertainment (i.e. video games) and educational purposes (i.e. medical or military training). Other, distinct types of VR style technology include augmented reality and mixed reality, sometimes referred to as extended reality or XR.
HYPERSPECTRAL IMAGERY CLASSIFICATION USING TECHNOLOGIES OF COMPUTATIONAL INTE...IAEME Publication
Texture information is exploited for classification of HSI (Hyperspectral Imagery) at high spatial resolution. For this purpose, framework employs to LBP (Local Binary Pattern) to extract local image features such as edges, corners & spots. After the extraction of LBP feature two levels of fusions are applied along with Gabor feature & spectral feature, i.e. Feature level fusion & Decision level fusion. In Feature level fusion multiple features are concurred before pattern classification. While in decision level fusion, it works on probability output of each individual classification pipeline combines the distinct decisions into final one. Decision level fusion consists of either hard fusion, soft fusion method. In hard fusion we consider majority part & in soft fusion linear logarithmic opinion pool at probability level (LOGP). In addition to this, extreme learning machine (ELM) classifier is included which is more efficient than support vector machine (SVM), used to provide probability classification output. It has simple structure with one hidden layer & one linear output layer. ELM trained much faster than SVM.
An image texture is a set of metrics calculated in image processing designed to quantify the perceived texture of an image. Image Texture gives us information about the spatial arrangement of color or intensities in an image or selected region of an image. This presentation consists of its types, uses, methods and approaches.
This slide will provide a tutorial for preprocessing of fMRI data. The step-by-step process will be provided.
visit my website for more information:
http:/skyeong.net
This ppt tells about struts in java. All the methods and brief knowledge of struts. For more info about struts and free projects on it please visit : http://s4al.com/category/study-java/
Discusses the microservices architectural style for cloud-based systems. Explains what is meant by microservices and architectural choices for microservices
In this presentation we described important things about Image processing and computer vision. If you have any query about this presentation then feels free to visit us at:
http://www.siliconmentor.com/
The real world scenes have a very wide range of luminance levels. But in the field of photography, the ordinary cameras are not capable of capturing the true dynamic range of a natural scene. To enhance the dynamic range of the captured image, a technique known as High Dynamic Range (HDR) imaging is generally used. HDR imaging is the process of capturing scenes with larger intensity range than what conventional sensors can capture. It can faithfully capture the details in dark and bright part of the scene. In this paper HDR generation method such as multiple exposure fusion in image domain and radiance domain are reviewed. The main issues in HDR imaging using multiple exposure combination technique are Misalignment of input images, Noise in data sets and Ghosting artefacts. The removal of these artefacts is a major step in HDR reconstruction. Methods for removing misalignment and noise are discussed and detailed survey of ghost detection and removal techniques are given in this paper. Single shot HDR imaging is a recent technique in the field of HDR reconstruction. Here instead of taking multiple exposure input images, a single image is used for generating HDR image. Various methods for Single shot HDR imaging are also reviewed.
AUGMENTED REALITY :-By superimposing virtual imagery, sound and theoretically even other sensorial enrichment over real-world environments in real-time, augmented reality serves as a tool to ever more enhance a human being’s awareness and performance.
Originally developed for military applications, the technology has since been transferred to civilian domains such as the medical field, the automobile or leisure industries and many more. While already in place and constantly receiving improvement, augmented reality still faces many shortcomings that limit its effectiveness and portability.
An image texture is a set of metrics calculated in image processing designed to quantify the perceived texture of an image. Image Texture gives us information about the spatial arrangement of color or intensities in an image or selected region of an image. This presentation consists of its types, uses, methods and approaches.
This slide will provide a tutorial for preprocessing of fMRI data. The step-by-step process will be provided.
visit my website for more information:
http:/skyeong.net
This ppt tells about struts in java. All the methods and brief knowledge of struts. For more info about struts and free projects on it please visit : http://s4al.com/category/study-java/
Discusses the microservices architectural style for cloud-based systems. Explains what is meant by microservices and architectural choices for microservices
In this presentation we described important things about Image processing and computer vision. If you have any query about this presentation then feels free to visit us at:
http://www.siliconmentor.com/
The real world scenes have a very wide range of luminance levels. But in the field of photography, the ordinary cameras are not capable of capturing the true dynamic range of a natural scene. To enhance the dynamic range of the captured image, a technique known as High Dynamic Range (HDR) imaging is generally used. HDR imaging is the process of capturing scenes with larger intensity range than what conventional sensors can capture. It can faithfully capture the details in dark and bright part of the scene. In this paper HDR generation method such as multiple exposure fusion in image domain and radiance domain are reviewed. The main issues in HDR imaging using multiple exposure combination technique are Misalignment of input images, Noise in data sets and Ghosting artefacts. The removal of these artefacts is a major step in HDR reconstruction. Methods for removing misalignment and noise are discussed and detailed survey of ghost detection and removal techniques are given in this paper. Single shot HDR imaging is a recent technique in the field of HDR reconstruction. Here instead of taking multiple exposure input images, a single image is used for generating HDR image. Various methods for Single shot HDR imaging are also reviewed.
AUGMENTED REALITY :-By superimposing virtual imagery, sound and theoretically even other sensorial enrichment over real-world environments in real-time, augmented reality serves as a tool to ever more enhance a human being’s awareness and performance.
Originally developed for military applications, the technology has since been transferred to civilian domains such as the medical field, the automobile or leisure industries and many more. While already in place and constantly receiving improvement, augmented reality still faces many shortcomings that limit its effectiveness and portability.
It's a very basic introduction of Load Runner for beginners, i explored it at my own, prepared slides & shared it with my colleagues.
What is Load Runner & why we need Performance testing etc.
Enjoy :)
This presentation was presented in Android Only! 2011 conference on June 14th.
With more than 300 different Android devices out on 6 different platform versions, application developers are facing a real nightmare when trying validate that their applications really work on their customers' devices. While fragmentation is a new thing in Android platform, it is not new in software industry and there are several ways to deal with device fragmentation from testing point of view.
This presentation discusses most common approaches to tackle fragmentation from application developer's point of view and explains why testing for device compatibility is a must for any serious Android application developer.
A complete Lab Manual with Aim, Procedure, Source Code, ... All the Experiments of Mobile Application Development Lab are developed using Android Studio.
The second part of the Android dev toolbox lecture,
This time we’ll focus on collection of tools and resources that help you build better apps in less time.
Xamarin.UITest is a C# test automation framework that enables testing mobile apps on Android and iOS. Mobile automation is not a piece of cake but Xamarin.UITest aims to provide a suitable abstraction on top of the platform tools to let you focus on what to test. This talk is not only an introduction of framework but also we are going to present its practical aspects, technical details, benefits and disadvantages. I will show a growing process from “0” – when you have only few local tests, to “Hero” – when you run your tests simultaneously and have fully integrated solution into CI/CD pipeline.
This presentation is based on Android application testing fundamentals. I have shared some basic idea about different automated android testing frameworks.
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...BBPMedia1
Grote partijen zijn al een tijdje onderweg met retail media. Ondertussen worden in dit domein ook de kansen zichtbaar voor andere spelers in de markt. Maar met die kansen ontstaan ook vragen: Zelf retail media worden of erop adverteren? In welke fase van de funnel past het en hoe integreer je het in een mediaplan? Wat is nu precies het verschil met marketplaces en Programmatic ads? In dit half uur beslechten we de dilemma's en krijg je antwoorden op wanneer het voor jou tijd is om de volgende stap te zetten.
Unveiling the Secrets How Does Generative AI Work.pdfSam H
At its core, generative artificial intelligence relies on the concept of generative models, which serve as engines that churn out entirely new data resembling their training data. It is like a sculptor who has studied so many forms found in nature and then uses this knowledge to create sculptures from his imagination that have never been seen before anywhere else. If taken to cyberspace, gans work almost the same way.
Buy Verified PayPal Account | Buy Google 5 Star Reviewsusawebmarket
Buy Verified PayPal Account
Looking to buy verified PayPal accounts? Discover 7 expert tips for safely purchasing a verified PayPal account in 2024. Ensure security and reliability for your transactions.
PayPal Services Features-
🟢 Email Access
🟢 Bank Added
🟢 Card Verified
🟢 Full SSN Provided
🟢 Phone Number Access
🟢 Driving License Copy
🟢 Fasted Delivery
Client Satisfaction is Our First priority. Our services is very appropriate to buy. We assume that the first-rate way to purchase our offerings is to order on the website. If you have any worry in our cooperation usually You can order us on Skype or Telegram.
24/7 Hours Reply/Please Contact
usawebmarketEmail: support@usawebmarket.com
Skype: usawebmarket
Telegram: @usawebmarket
WhatsApp: +1(218) 203-5951
USA WEB MARKET is the Best Verified PayPal, Payoneer, Cash App, Skrill, Neteller, Stripe Account and SEO, SMM Service provider.100%Satisfection granted.100% replacement Granted.
Tata Group Dials Taiwan for Its Chipmaking Ambition in Gujarat’s DholeraAvirahi City Dholera
The Tata Group, a titan of Indian industry, is making waves with its advanced talks with Taiwanese chipmakers Powerchip Semiconductor Manufacturing Corporation (PSMC) and UMC Group. The goal? Establishing a cutting-edge semiconductor fabrication unit (fab) in Dholera, Gujarat. This isn’t just any project; it’s a potential game changer for India’s chipmaking aspirations and a boon for investors seeking promising residential projects in dholera sir.
Visit : https://www.avirahi.com/blog/tata-group-dials-taiwan-for-its-chipmaking-ambition-in-gujarats-dholera/
Attending a job Interview for B1 and B2 Englsih learnersErika906060
It is a sample of an interview for a business english class for pre-intermediate and intermediate english students with emphasis on the speking ability.
Putting the SPARK into Virtual Training.pptxCynthia Clay
This 60-minute webinar, sponsored by Adobe, was delivered for the Training Mag Network. It explored the five elements of SPARK: Storytelling, Purpose, Action, Relationships, and Kudos. Knowing how to tell a well-structured story is key to building long-term memory. Stating a clear purpose that doesn't take away from the discovery learning process is critical. Ensuring that people move from theory to practical application is imperative. Creating strong social learning is the key to commitment and engagement. Validating and affirming participants' comments is the way to create a positive learning environment.
Skye Residences | Extended Stay Residences Near Toronto Airportmarketingjdass
Experience unparalleled EXTENDED STAY and comfort at Skye Residences located just minutes from Toronto Airport. Discover sophisticated accommodations tailored for discerning travelers.
Website Link :
https://skyeresidences.com/
https://skyeresidences.com/about-us/
https://skyeresidences.com/gallery/
https://skyeresidences.com/rooms/
https://skyeresidences.com/near-by-attractions/
https://skyeresidences.com/commute/
https://skyeresidences.com/contact/
https://skyeresidences.com/queen-suite-with-sofa-bed/
https://skyeresidences.com/queen-suite-with-sofa-bed-and-balcony/
https://skyeresidences.com/queen-suite-with-sofa-bed-accessible/
https://skyeresidences.com/2-bedroom-deluxe-queen-suite-with-sofa-bed/
https://skyeresidences.com/2-bedroom-deluxe-king-queen-suite-with-sofa-bed/
https://skyeresidences.com/2-bedroom-deluxe-queen-suite-with-sofa-bed-accessible/
#Skye Residences Etobicoke, #Skye Residences Near Toronto Airport, #Skye Residences Toronto, #Skye Hotel Toronto, #Skye Hotel Near Toronto Airport, #Hotel Near Toronto Airport, #Near Toronto Airport Accommodation, #Suites Near Toronto Airport, #Etobicoke Suites Near Airport, #Hotel Near Toronto Pearson International Airport, #Toronto Airport Suite Rentals, #Pearson Airport Hotel Suites
VAT Registration Outlined In UAE: Benefits and Requirementsuae taxgpt
Vat Registration is a legal obligation for businesses meeting the threshold requirement, helping companies avoid fines and ramifications. Contact now!
https://viralsocialtrends.com/vat-registration-outlined-in-uae/
Enterprise Excellence is Inclusive Excellence.pdfKaiNexus
Enterprise excellence and inclusive excellence are closely linked, and real-world challenges have shown that both are essential to the success of any organization. To achieve enterprise excellence, organizations must focus on improving their operations and processes while creating an inclusive environment that engages everyone. In this interactive session, the facilitator will highlight commonly established business practices and how they limit our ability to engage everyone every day. More importantly, though, participants will likely gain increased awareness of what we can do differently to maximize enterprise excellence through deliberate inclusion.
What is Enterprise Excellence?
Enterprise Excellence is a holistic approach that's aimed at achieving world-class performance across all aspects of the organization.
What might I learn?
A way to engage all in creating Inclusive Excellence. Lessons from the US military and their parallels to the story of Harry Potter. How belt systems and CI teams can destroy inclusive practices. How leadership language invites people to the party. There are three things leaders can do to engage everyone every day: maximizing psychological safety to create environments where folks learn, contribute, and challenge the status quo.
Who might benefit? Anyone and everyone leading folks from the shop floor to top floor.
Dr. William Harvey is a seasoned Operations Leader with extensive experience in chemical processing, manufacturing, and operations management. At Michelman, he currently oversees multiple sites, leading teams in strategic planning and coaching/practicing continuous improvement. William is set to start his eighth year of teaching at the University of Cincinnati where he teaches marketing, finance, and management. William holds various certifications in change management, quality, leadership, operational excellence, team building, and DiSC, among others.
Improving profitability for small businessBen Wann
In this comprehensive presentation, we will explore strategies and practical tips for enhancing profitability in small businesses. Tailored to meet the unique challenges faced by small enterprises, this session covers various aspects that directly impact the bottom line. Attendees will learn how to optimize operational efficiency, manage expenses, and increase revenue through innovative marketing and customer engagement techniques.
The world of search engine optimization (SEO) is buzzing with discussions after Google confirmed that around 2,500 leaked internal documents related to its Search feature are indeed authentic. The revelation has sparked significant concerns within the SEO community. The leaked documents were initially reported by SEO experts Rand Fishkin and Mike King, igniting widespread analysis and discourse. For More Info:- https://news.arihantwebtech.com/search-disrupted-googles-leaked-documents-rock-the-seo-world/
Premium MEAN Stack Development Solutions for Modern BusinessesSynapseIndia
Stay ahead of the curve with our premium MEAN Stack Development Solutions. Our expert developers utilize MongoDB, Express.js, AngularJS, and Node.js to create modern and responsive web applications. Trust us for cutting-edge solutions that drive your business growth and success.
Know more: https://www.synapseindia.com/technology/mean-stack-development-company.html
Premium MEAN Stack Development Solutions for Modern Businesses
WinRunner Training
1.
2. Benefits of Automated Testing WinRunner Testing Process WinRunner Recording Mode Working with other Test Suite Tools
3.
4. Benefits of Automated Testing Fast: Run tests significantly faster than human users Reliable: Tests perform precisely the same operations each time they are run, thereby eliminating human error Repeatable: You can test how the software reacts under repeated execution of the same operations Programmable: You can program sophisticated tests that bring out hidden information from the application Comprehensive: You can build a suite of tests that covers every feature in your application Reusable: You can reuse tests on different versions of an application, even if the user interface changes
25. How Does WinRunner Identify an Object? John ******* WinRunner uses an object’s physical attributes to identify the object Displayed label class MSW_class x y abs_x abs_y maximizable focused width height active MSW_id handle minimizable nchildren enabled TOOLKIT_class ATTRIBUTES
26. How Does WinRunner Uniquely Identify an Object? John ******* WR uses the minimum number of static attributes to achieve unique identification label class Class: push_button Label: “OK”
27. How Does WinRunner Assign Object Names? John ******* WinRunner assigns a short name to each object called the logical name Class: push_button Label: “OK” button_press (“ OK ”); edit_set (“ Name ”, “John”); edit_set (“ Password ”, “mercury”);
28. Into Which Field Will WinRunner Play Back? set_window("Login", 10); edit_set ("Name:", "John"); John ? ?
29. Scope of Identification edit_set ("Name:", "John"); John WinRunner identifies an object within the scope of its parent window (not the entire application) set_window ("Login", 10);
30.
31.
32.
33. GUI Map Translates Logical Names Into Physical Descriptions Options Class: Window Label: Window Dealer Name Class: Edit label: DealerName Address Class: Window Label: Address Login Class: Window Label: Login Automobile Purchase Form Class: Window Label: APF Customer Name Class: Edit label: CustomerName Make Class: Window Label: Make SCRIPT GUI MAP AUT set_window("Automobile Purchase Form", 10); edit_set ("Address","234 Willow Drive"); edit_set ("Customer Name", "Thomas Paine"); Logical Name Physical Description
37. Techniques For Managing GUI Map Files Technique 1 One GUI Map file per test Technique 2 One GUI Map file for many tests
38. Object and Window Properties During Recording Name: Description: Date class: edit attached_text: "Date" set_window("Automobile Purchase Form", 10); list_select_item ("Make", "BMW"); edit_set ("Year", "1973"); edit_set("Model", "2002tii"); WINDOW: Automobile Purchase Form Year class: edit attached_text: "Year" Make class: list attached_text: "Make" Model class: edit attached_text: "Model" edit_set ("Date", "12/12/03"); WinRunner stores the names and descriptions for windows and objects in a temporary GUI Map file Temporary GUI Map file Technique 1
39. What Happens to These Properties? Use the GUI Map Editor to save the contents of the Temporary GUI Map file to a permanent GUI Map file Technique 1 Temporary GUI Map file Name: Description: Date class: edit attached_text: "Date" WINDOW: Automobile Purchase Form Year class: edit attached_text: "Year" Make class: list attached_text: "Make" Model class: edit attached_text: "Model"
41. Adding New Windows and Objects to a GUI Map File Invoke the GUI Map Editor 1 Technique 1
42. Adding New Windows and Objects to a GUI Map File Technique 1 Invoke the GUI Map Editor 1 Press the Expand Button to display Temporary and Permanent GUI Map files 2
43. Adding New Windows and Objects to a GUI Map File Technique 1 Invoke the GUI Map Editor 1 Move contents of Temp to Permanent by pressing Move button 3 Press the Expand Button to display Temporary and Permanent GUI Map files 2
44. Adding New Windows and Objects to a GUI Map File Technique 1 Save changes to permanent GUI Map file 4 Invoke the GUI Map Editor 1 Press the Expand Button to display Temporary and permanent GUI Map files 2 Move contents of Temp to permanent by pressing Move button 3
48. Creating a Permanent GUI Map File The cursor changes to a pointing hand Technique 2 Invoke the GUI Map Editor 1 Click the Learn Button 2
49. Creating a Permanent GUI Map File The cursor changes to a pointing hand Technique 2 Invoke the GUI Map Editor 1 Click the Learn Button 2 Click on the Window to be learned 3
50. Creating a Permanent GUI Map File The cursor changes to a pointing hand WinRunner learns all objects in window Technique 2 Invoke the GUI Map Editor 1 Click the Learn Button 2 Click on the Window to be learned 3
51. Creating a Permanent GUI Map File The cursor changes to a pointing hand WinRunner learns all objects in window Technique 2 Invoke the GUI Map Editor 1 Click the Learn Button 2 Click on the Window to be learned 3 Repeat for all windows in the application 4
52. Modify Names for Script Readability These names are unreadable. To what objects do they refer ? Technique 2
53. Modify Names for Script Readability Technique 2 Highlight the object whose name you want to change 1
54. Modify Names for Script Readability Technique 2 Highlight the object whose name you want to change 1 Click the Modify Button 2
55. Modify Names for Script Readability Technique 2 Highlight the object whose name you want to change 1 Change the Logical Name of the object 3 Click the Modify Button 2 Click OK 4
56. Modify Names for Script Readability "Name:” appears in your test script during recording instead of "ThunderRTTextBox_0" RESULT ! Technique 2 Click OK 4 Highlight the object whose name you want to change 1 Change the Logical Name of the object 3 Click the Modify Button 2
58. Which Technique Should You Use? Technique 1 Advantages 1. Each test has GUI Map file independence 2. There is no need for a GUI Map file administrator 3. The GUI Map file is very simple to create–record and save Preferred method if the application is not intended to change during renovation Technique 2 Advantages 1. Object and window names can be very readable in the test script 2. If an object or window description changes, you only have to modify one GUI Map file–all tests will play back properly Preferred method if the application might change during renovation
59. Importance of the GUI Map File ? set_window("Automobile Purchase Form", 10); edit_set ("Date", "12/12/03"); list_select_item ("Make", "BMW"); edit_set ("Year", "1973"); edit_set("Model", "2002tii"); edit_set ("Purchase Price", "20000.00"); What happens when playback is attempted, and the proper GUI Map file is not loaded? Automobile Purchase Form Date
64. Use the GUI Map Editor to Fix File *L1 Insert.gui L1 Insert.gui Active GUI file: N:Y2K_ProjectGUInsert.gui Invoke the GUI Map Editor 1 Edit the description 3 Save the file 4 Highlight field and press Modify 2
65. Fixing the GUI Map File 12/12 /03 set_window("Automobile Purchase Form", 10); edit_set ("Date", "12/12/03"); list_select_item ("Make", "BMW"); edit_set ("Year", "1973"); edit_set("Model", "2002tii"); BMW 1973 2002tii ! Success WinRunner can now successfully playback the script
66.
67. Add GUI Map Editor to the Custom User Toolbar An icon for each command selected is added to the User Toolbar Select Settings > Customize User Toolbar 1 In each category, select command(s) to appear in toolbar 2
73. Verifying the AUT - Manual Testing PASS ? Step Step Description Expected Result 1 Select File > New SOFTWARE REQUIREMENT SPECIFICATIONS 2.3.2 Creating a New Order Once the end user selects File > New and enters their name, the "Terms" button is automatically enabled.
74. Verifying the AUT - Manual Testing Step Step Description Expected Result William Frawley PASS ? 2 Enter your name The Terms button is enabled 1 Select File > New SOFTWARE REQUIREMENT SPECIFICATIONS 2.3.2 Creating a New Order Once the end user selects File > New and enters their name, the "Terms" button is automatically enabled.
75. Verifying the AUT - Manual Testing Step Step Description Expected Result 2 Enter your name The Terms button is enabled 1 Select File > New William Frawley PASS ? SOFTWARE REQUIREMENT SPECIFICATIONS 2.3.2 Creating a New Order Once the end user selects File > New and enters their name, the "Terms" button is automatically enabled.
76. Verifying the AUT - Automated Testing William Frawley ? set_window ("Automobile Purchase Form", 8); menu_select_item ("File;New Form"); edit_set ("Customer Name", "William Frawley"); SOFTWARE REQUIREMENT SPECIFICATIONS 2.3.2 Creating a New Order Once the end user selects File > New and enters their name, the "Terms" button is automatically enabled.
77. What Is WinRunner Verification? Definition: Verification is the process by which WinRunner reports whether expected results are actualized by the application.
78. How WinRunner Verifies WinRunner compares the actual result to the stored, expected result 3 WinRunner captures an actual result during playback 2 1 WinRunner or the tester stores an expected result with the recorded test script WinRunner reports the comparison outcome as PASS or FAIL 4
79. How Does a Checkpoint Work? 1 2 3 4 = X ? WinRunner WinRunner WinRunner WinRunner Pass Fail Test Report Expected AUT Actual Expected AUT Actual
80. Process to Create Verification Run the recorded test script to verify correct execution 3 Test the checkpoint to ensure that it works for PASS and FAIL conditions 2 1 Capture or create the expected result within the recorded test script The tester creates the expected result only for text verification NOTE
88. How Does GUI Checkpoints Work ? 1 2 3 4 = X ? WinRunner WinRunner WinRunner WinRunner Pass Fail Test Report Expected Actual Expected Actual AUT AUT
89. Process for GUI checkpoints Test the Checkpoint to ensure that it works for ‘Pass’ & ‘Fail’ conditions 3 Create GUI checkpoint 2 1 Determine the visual cue(s) Run the recorded Test Script to verify correct execution 4
93. Checkpoint differs depending on the object to be verified Win_check_info Window Obj_check_info Generic Object button_check_info Button(check,radio,push) list_check_info List Checkpoint function Type of Object
94. Process for GUI checkpoints Create GUI checkpoint 2 1 Determine the visual cue(s)
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105. Process for GUI checkpoints Test the Checkpoint to ensure that it works for ‘Pass’ & ‘Fail’ conditions 3 Create GUI checkpoint 2 1 Determine the visual cue(s)
106.
107. Process for GUI checkpoints Test the Checkpoint to ensure that it works for ‘Pass’ & ‘Fail’ conditions 3 Create GUI checkpoint 2 1 Determine the visual cue(s) Run the recorded Test Script to verify correct execution 4
108.
109. Test directory after GUI Checkpoint Testing Project Tests chklist List1.ckl exp Test2 gui1.chk Test1 Test2
113. Flight Database Schema Flight_Number (FK) Order_Number (PK) Orders Flight_Number (PK) Flight A Foreign Key value in a table must exist as a Primary Key value in a referenced table or be null Referential Integrity
114.
115.
116.
117.
118. How Does Database Checkpoint Work ? 1 2 3 4 = X ? WinRunner WinRunner WinRunner WinRunner Pass Fail Test Report Expected Actual Expected Actual AUT AUT
119. Process for Database Checkpoints Test the condition to ensure that it works for Pass and Fail conditions 3 Use Database Checkpoint wizard to implement the Database Checkpoint 2 1 Record User actions to create database transaction Run the recorded scripts 4
120. Process for Database Checkpoints 1 Record User actions to create database transaction
121. Record user actions to create a Database transaction edit_set ( "Name:" , "Preeti" ); button_press ( "Insert Order" ); Preeti set_window ( "Flight Reservation" , 7 ); edit_set ( "Date of Flight:" , "09/06/02" );
122. Process for Database Checkpoints Use Database Checkpoint wizard to implement the database checkpoint 2 1 Record User actions to create database transaction
123.
124.
125.
126. Process for Database checkpoints Test the condition to ensure that it works for Pass and Fail conditions 3 Use Database Checkpoint wizard to implement the database checkpoint 2 1 Record User actions to create database transaction
127.
128. Process for Database checkpoints Test the Checkpoint to ensure that it works for ‘Pass’ & ‘Fail’ conditions 3 Use Database Checkpoint wizard to implement the database checkpoint 2 1 Record User actions to create database transaction Run the recorded scripts 4
129.
130. Test directory after Database Checkpoint Testing Project Tests chklist list1.cdl msqr1.sql exp Test2 dbvf1 Test1 Test2
135. How Does Bitmap Checkpoint Work ? 1 2 3 4 = X ? WinRunner WinRunner WinRunner WinRunner Pass Fail Test Report Expected Actual Expected Actual AUT AUT
136. Process for Bitmap Checkpoints Test the condition to ensure that it works for Pass and Fail conditions 3 Create a Bitmap Checkpoint in the recorded Test Script 2 1 Is Bitmap verification necessary If yes verify screen area or object/window? Run the recorded scripts Differences are reported in Test Results and the difference Bitmap is found 4
137. Process for Bitmap Checkpoints Create a Bitmap Checkpoint in the recorded Test Script 2 1 Is Bitmap verification necessary If yes verify screen area or object/window?
138.
139.
140.
141. Process for Bitmap Checkpoints Test the condition to ensure that it works for Pass and Fail conditions 3 Create a Bitmap Checkpoint in the recorded Test Script 2 1 Is Bitmap verification necessary If yes verify screen area or object/window?
142.
143.
144. Process for Bitmap Checkpoints Test the Checkpoint to ensure that it works for ‘Pass’ & ‘Fail’ conditions 3 Create a Bitmap Checkpoint in the recorded Test Script 2 1 Is Bitmap verification necessary If yes verify screen area or object/window? Run the recorded scripts Differences are reported in Test Results and the difference Bitmap is found 4
149. Process for Text Checkpoints Insert code to compare the actual and expected value 3 Insert a function to read the actual text from the AUT during playback 2 1 Define a variable in the script and assign the expected value Insert code to report the comparison outcome to WinRunner Test Results window 4
150. Process for Text Checkpoints 1 Define a variable in the script and assign the expected value
151.
152. Process for Text Checkpoints Insert a function to read the actual text from the AUT during playback 2 1 Define a variable in the script and assign the expected value
153.
154. Process for Text Checkpoints Insert code to compare the actual and expected value 3 Insert a function to read the actual text from the AUT during playback 2 1 Define a variable in the script and assign the expected value
155.
156. Process for Text Checkpoints Insert code to compare the actual and expected value 3 Insert a function to read the actual text from the AUT during playback 2 1 Define a variable in the script and assign the expected value Insert code to report the comparison outcome to WinRunner Test Results window 4
163. What Is the Data Table? The Data Table is a spreadsheet file in WinRunner that stores the input values you will use to data-drive your test . Definition:
164.
165. Data Driving Tests Create a test 1 Modify test to read from Data Table 2 3 Move data to Data Table 1. Create test with data 2. Verify script is ready for data driving Create a test
166. 1. Create a Test Create Test with Data invoke_application(“flight1a.exe","","C:",SW_SHOW); set_window ("Login", 10); edit_set ("userid", "Josephine"); password_edit_set ("password", “kxpvnwoulxjuax” ); button_press ("OK"); set_window ("Flight Reservation", 10); win_check_gui("Flight Reservation", "list1.ckl", "gui1", 1); menu_select_item ("File;Exit"); Test Script
167. 1. Create a Test Verify that Script Is Ready to Data Drive invoke_application(“flight1a.exe","","C:",SW_SHOW); set_window ("Login", 10); edit_set ("userid", "Josephine"); password_edit_set ("password", “kxpvnwoulxjuax” ); button_press ("OK"); set_window ("Flight Reservation", 10); win_check_gui("Flight Reservation", "list1.ckl", "gui1", 1); menu_select_item ("File;Exit"); Does the script verify the expected results? Are all actions that involve inputting data recorded into the script? Are all synchronization points entered into the script? Are the initial and end conditions the same? ? Test Script
168. Data Driving Tests Create a test 1 Move data to Data Table 3 Modify test to read from Data Table 2 Modify test to read from Data Table 1. Run DataDriver Wizard
169. The DataDriver Wizard will convert your baseline script table = "default.xls" ; rc = ddt_open (table, DDT_MODE_READ); if (rc!= E_OK && rc != E_FILE_OPEN) pause ( "Cannot open table." ); ddt_get_row_count (table,table_RowCount); for (table_Row = 1 ; table_Row <= table_RowCount; table_Row ++) { ddt_set_row (table,table_Row); invoke_application ( "D:flight1a.exe" , "" , "" ,SW_SHOW); set_window ( "Login" , 10 ); edit_set ( "Agent Name:" , ddt_val (table, "Agent_Name" )); password_edit_set ( "Password:" , ddt_val (table, "Password" )); button_press ( "OK" ); set_window ( "Flight Reservation" , 22 ); menu_select_item ( "File;Exit" ); } ddt_close (table); so that it will: 2. Modify Test to Read from Data Table What Does the DataDriver Do? Open the Data Table and check that it was successfully opened 1 invoke_application ( "D:flight1a.exe" , "" , "" ,SW_SHOW); set_window ( "Login" , 10 ); edit_set ( "Agent Name:" , "Catherine" ); password_edit_set ( "Password:" , "kzptnyoslzjsaz" ); button_press ( "OK" ); set_window ( "Flight Reservation" , 22 ); menu_select_item ( "File;Exit" );
170. Open the Data Table and check that it was successfully opened 1 table = "default.xls" ; rc = ddt_open (table, DDT_MODE_READ); if (rc!= E_OK && rc != E_FILE_OPEN) pause ( "Cannot open table." ); ddt_get_row_count (table,table_RowCount); for (table_Row = 1 ; table_Row <= table_RowCount; table_Row ++) { ddt_set_row (table,table_Row); invoke_application ( "D:flight1a.exe" , "" , "" ,SW_SHOW); set_window ( "Login" , 10 ); edit_set ( "Agent Name:" , ddt_val (table, "Agent_Name" )); password_edit_set ( "Password:" , ddt_val (table, "Password" )); button_press ( "OK" ); set_window ( "Flight Reservation" , 22 ); menu_select_item ( "File;Exit" ); } ddt_close (table); The DataDriver Wizard will convert your baseline script so that it will: 2. Modify Test to Read from Data Table What Does the DataDriver Do? Add a loop to read through all your data rows 2
171. table = "default.xls" ; rc = ddt_open (table, DDT_MODE_READ); if (rc!= E_OK && rc != E_FILE_OPEN) pause ( "Cannot open table." ); ddt_get_row_count (table,table_RowCount); for (table_Row = 1 ; table_Row <= table_RowCount; table_Row ++) { ddt_set_row (table,table_Row); invoke_application ( "D:flight1a.exe" , "" , "" ,SW_SHOW); set_window ( "Login" , 10 ); edit_set ( "Agent Name:" , ddt_val (table, "Agent_Name" )); password_edit_set ( "Password:" , ddt_val (table, "Password" )); button_press ( "OK" ); set_window ( "Flight Reservation" , 22 ); menu_select_item ( "File;Exit" ); } ddt_close (table); Open the Data Table and check that it was successfully opened 1 The DataDriver Wizard will convert your baseline script so that it will: 2. Modify Test to Read from Data Table What Does the DataDriver Do? Add a loop to read through all your data rows 2 Parameterize data values so that it reads from the Data Table 3
172. 2. Modify Test to Read from Data Table What Does the DataDriver Do? table = "default.xls" ; rc = ddt_open (table, DDT_MODE_READ); if (rc!= E_OK && rc != E_FILE_OPEN) pause ( "Cannot open table." ); ddt_get_row_count (table,table_RowCount); for (table_Row = 1 ; table_Row <= table_RowCount; table_Row ++) { ddt_set_row (table,table_Row); invoke_application ( "D:flight1a.exe" , "" , "" ,SW_SHOW); set_window ( "Login" , 10 ); edit_set ( "Agent Name:" , ddt_val (table, "Agent_Name" )); password_edit_set ( "Password:" , ddt_val (table, "Password" )); button_press ( "OK" ); set_window ( "Flight Reservation" , 22 ); menu_select_item ( "File;Exit" ); } ddt_close (table); Open the Data Table and check that it was successfully opened 1 The DataDriver Wizard will convert your baseline script so that it will: Add a loop to read through all your data rows 2 Parameterize data values so that it reads from the Data Table 3 Close the Data Table 4
173. 2. Modify Test to Read from Data Table Running the DataDriver Wizard invoke_application(“flight1a.exe","","C:",SW_SHOW); set_window ("Login", 10); edit_set ("userid", ”Catherine"); password_edit_set ("password", “kxpvnwoulxjuax” ); button_press ("OK"); set_window ("Flight Reservation", 10); win_check_gui("Flight Reservation", "list1.ckl", "gui1", 1); menu_select_item ("File;Exit"); 1. Highlight area you want to be data driven. 2. Start the DataDriver Wizard. invoke_application(“flight1a.exe","","C:",SW_SHOW); set_window ("Login", 10); edit_set ("userid", ”Catherine"); password_edit_set ("password", “kxpvnwoulxjuax” ); button_press ("OK"); set_window ("Flight Reservation", 10); win_check_gui("Flight Reservation", "list1.ckl", "gui1", 1); menu_select_item ("File;Exit"); 1 2
174. 2. Modify Test to Read from Data Table Running the DataDriver Wizard Final Result table = " default.xls "; rc = ddt_open( table , DDT_MODE_READ); if (rc!= E_OK && rc != E_FILE_OPEN) pause("Cannot open table."); ddt_get_row_count( table , table_RowCount); for(table_Row = 1; table_Row <= table_RowCount; table_Row ++) { ddt_set_row( table ,table_Row); invoke_application("D:flight1a.exe","","",SW_SHOW); set_window ("Login", 10); edit_set ("Agent Name:",ddt_val( table ,"Agent_Name")); password_edit_set("Password:",ddt_val( table ,"Password")); button_press ("OK"); set_window ("Flight Reservation", 22); menu_select_item ("File;Exit"); } ddt_close( table );
175. 2. Modify Test to Read from Data Table Running the DataDriver Wizard Where does the Data Table reside? <test name> default.xls
176.
177. 3. Move Data to Data Table Importing Data From Database to Data Table Database
178. 3. Move Data to Data Table Importing Data From Database to Data Table Database
179. 2. Modify Test to Read from Data Table Running the DataDriver Wizard edit_set ("Agent Name:", “Catherine”); ? Final Result edit_set(“Agent Name:”, ddt_val(table,”Agent_Name”) );
180. 2. Modify Test to Read from Data Table Running the DataDriver Wizard
181. Data Driving Tests Create a test 1 2 3 Move data to Data Table Modify test to read from Data Table
182.
183. 3. Move Data to Data Table Insert Data Manually Open the Data Table 1 Enter Data you want to test 2 Close Data Table and save script 3
184. 3. Move Data to Data Table Add Data Dynamically During Run Create Invoice Test 1 mer InvoiceNum 3421 yelet phine Data Table 3423 3423 3423 . . . . . . ddt_set_val(... Update Invoice Test 2 . . . . . . edit_set(...,ddt_val ...
185. 3. Move Data to Data Table Add Data Dynamically During Run Add column to Data Table for data to be added 1
186. 3. Move Data to Data Table Add Data Dynamically During Run table = "default.xls"; rc = ddt_open(table, DDT_MODE_READ); if (rc!= E_OK && rc != E_FILE_OPEN) pause("Cannot open table."); ddt_get_row_count(table,table_RowCount); for(table_Row = 1; table_Row <= table_RowCount; table_Row ++) { ddt_set_row(table,table_Row); set_window ("Automobile Purchase Form", 2); edit_set ("Customer Name",ddt_val(table,"Customer_Name")); edit_set("Address:",ddt_val(table,"Address")); edit_set ("License",ddt_val(table,"License")); obj_mouse_click ("Method of Payment", 23, 13, LEFT); button_set (ddt_val(table,"Cash"), ON); list_select_item ("Make",ddt_val(table,"Make")); # Item Number 0; edit_set ("Model",ddt_val(table,"Model")); button_press ("Insert Sale"); edit_wait_info("StatusBar","value","New Purchase Completed Successfully...",10); } ddt_close(table); Add column to Data Table for data to be added 1 ddt_set_val ( table , “ ”, InvoiceNumber ); obj_get_info ("Invoice No:","label", InvoiceNumber ); ddt_save ( table ); Modify the script so that it: 2 captures the data and saves it to a variable a sets the value in the Data Table b saves changes to the Data Table c Data Table InvoiceNo
191. How Do Client-Server Applications Behave? Single User Database server Server response time:
192. How Do Client-Server Applications Behave? Several Users Database server Server response time:
193. How Do Client-Server Applications Behave? Many Users Database server Server response time:
194. How Do Client-Server Applications Behave? Example Response Times RESPONSE TIME Several users 0.61 Many users 1.00 Single user 0.33
195. Complete the Business Process Manually Database 07/07/01 Los Angeles Denver Cash Enter 07/07/01 on Date field Select LA from Fly From field Select Denver from Fly To field Enter Cash as Method of Payment Press Flights button Example steps
196. Complete the Business Process Manually Database Enter 07/07/01 on Date field Select LA from Fly From field Select Denver from Fly To field Enter Cash as Method of Payment Press Flights button Select a flight Example steps
197. Complete the Business Process Manually Database 07/07/01 Los Angeles Denver Cash Errol Flynn Enter Customer Name Insert Order Wait for response before continuing Enter 07/07/01 on Date field Select LA from Fly From field Select Denver from Fly To field Enter Cash as Method of Payment Press Flights button Select a flight 7328 Close application Example steps
198. Manual Steps Recorded in the Test Script edit_set ("Date","070701"); list_select_item ( "Fly From:", "Los Angeles" ); list_select_item ("Fly To:", "Denver"); list_select_item ("Payment:", "Cash" ); button_press ( "Flights" ); button_press ( "Insert Order" ); ??? Enter 07/07/01 on Date field Select LA from Fly From field Select Denver from Fly To field Enter Cash as Method of Payment Press Flights button Enter Customer Name Insert Order Wait for response before continuing Select a flight win_close ( "Flight Reservation" ); Close the application set_window ( "Flights Table" , 4); button_press ( "OK" ); Example steps edit_set ( "Customer Name:" , "Errol Flynn" ); set_window ( "Flight Reservation" , 10);
199. Why Not Insert a Wait Statement? button_press ( "Insert Order" ); win_close ( "Flight Reservation" ); wait ( ); 10 50 users 5.1 seconds 500 users 9.5 seconds 1 user 3.7 seconds AVERAGE RESPONSE TIMES
200. Why Not Insert a Wait Statement? AUT 11.3 seconds RUN #1 Wait (10); button_press ( "Insert Order" ); win_close ( "Flight Reservation" ); wait ( ); 10 button_press ( "Insert Order" ); win_close ( "Flight Reservation" ); wait ( ); 15 PROBLEM: Test run failed because wait didn't last long enough SOLUTION: Add 50% to wait time as safety cushion
201. Why Not Insert a Wait Statement? AUT 5.5 seconds RUN #2 Wait (15); 15 seconds button_press ( "Insert Order" ); win_close ( "Flight Reservation" ); wait ( ); 15 PROBLEM: Most of the wait time was unnecessary SOLUTION: Don't use a wait statement – use something that will continue as soon a s the AUT is finished. But what will do that? button_press ( "Insert Order" ); win_close ( "Flight Reservation" ); ???
202. What Is a Synchronization Point? A synchronization point is a line in the test script that instructs WinRunner to wait for a certain response from the application during playback, just as a real user would. Definition:
203. ADD SYNCHRONIZATION POINTS Introduction to Synchronization Add Synchronization Points Record user actions in script 1 Synchronize script to application under test 2 Add verification statements to check AUT 3 Run test or suite of tests 4
204. Process to Add Synchronization Points Add Synchronization Points Establish visual cues to synchronize 1 Determine type of synchronization point 2 Add synchronization point to test script 3 Play back revised script 4
205. Establish Visual Cue to Synchronize Examples 1 Wait for a bitmap to refresh BITMAP Wait for a window WINDOW Wait for an object state OBJECT STATE
206. Methods of Synchronization obj_wait_info ("Bar","label", "Insert Done...", 20); Wait for an object state/property value obj_wait_bitmap ("Window", "Img1", 10, 209, 170, 81, 20 ); Wait for a bitmap set_window ("Flight Reservation", 20); Wait for a window
207. Determine Type of Synchronization (Waiting for a Window) 2 Window name Time set_window ("Flight Reservation", 20); Wait for main window to appear after login
208. Properties of Standard GUI Objects (Examples) Boolean Values 0 = False 1 = True State 3 State 2 State 1 class: push_button, focused: 1, label: "Insert Order", enabled: 1 class: push_button, focused: 0, label: "Insert Order", enabled: 1 class: push_button, focused: 0, label: "Insert Order", enabled: 0
211. Determine Type of Synchronization (Change in Object Property/State) 2 obj_wait_info ("Bar","label", "Insert Done...", 20); Object name Object property Synchronize with a progress bar message
212. Determine Type of Synchronization (Change in Object Property/State) 2 obj_wait_info ("Bar","label", "Insert Done...", 20); value Time Synchronize with a progress bar message
213. Determine Type of Synchronization (Waiting for a Bitmap) 2 obj_wait_bitmap ("Window", "Img1", 10, 209, 170, 81, 20 ); Object name Bitmap name Sync with browser loading a bitmap
214. Determine Type of Synchronization (Waiting for a Bitmap) 2 obj_wait_bitmap ("Window", "Img1", 10, 209, 170, 81, 20 ); Time x , y Sync with browser loading a bitmap
215. Determine Type of Synchronization (Waiting for a Bitmap) 2 obj_wait_bitmap ("Window", "Img1", 10, 209, 170, 81, 20 ); width height Img1.bmp Bitmap File Location: Test_name exp Test_name Sync with browser loading a bitmap
216. How Long Does It Wait? "OK" "Error" TIME PARAMETER Global timeout setting Global timeout interval GLOBAL + Test run 1 TOTAL = Maximum total timeout Synchronization statement timeout parameter Script continues Script continues Test run 2
217. Add Synchronization to Test Script Wait for a Window 3 # Login set_window ( "Login" ,4); edit_set ( "Agent Name:", "mercury" ); password_edit_set ( "Password:","kjzisllz" ); button_press ( "OK" ); # Flight Reservation set_window ( "Flight Reservation" , 25 ); Locate the TSL statement that points to the determined visual cue 1
218. Add Synchronization to Test Script Wait for a Window # Login set_window ( "Login" ,4); edit_set ( "Agent Name:", "mercury" ); password_edit_set ( "Password:","kjzisllz" ); button_press ( "OK" ); # Flight Reservation set_window ( "Flight Reservation" , 25 ); 3 Recorded time parameter reflects delay during script recording session 60 Locate the TSL statement that points to the determined visual cue 1 Modify timeout parameter to allow ample time for window to appear 2
219. Add Synchronization to Test Script Wait for an Object State/Property Value list_select_item ( "Fly From:","Denver" ); list_select_item ( "Fly To:","San Francisco" ); # Flights Table set_window ( "Flights Table" ,2); list_activate_item ( "Flight", "2452..." ); # Flight Reservation set_window ( "Flight Reservation" ,3); edit_set ( "Customer Name:","Bob Smith" ); button_press ( "Insert Order" ); 3 Locate the line in the script to insert the synchronization point 1
220. Add Synchronization to Test Script Wait for an Object State/Property Value list_select_item ( "Fly From:","Denver" ); list_select_item ( "Fly To:","San Francisco" ); # Flights Table set_window ( "Flights Table" ,2); list_activate_item ( "Flight", "2452..." ); # Flight Reservation set_window ( "Flight Reservation" ,3); edit_set ( "Customer Name:","Bob Smith" ); button_press ( "Insert Order" ); 3 Locate the line in the script to insert the synchronization point 1 Select Create > Synchronization Point/For Object/Window Property 2
221. Add Synchronization to Test Script Wait for an Object State/Property Value list_select_item ( "Fly From:","Denver" ); list_select_item ( "Fly To:","San Francisco" ); # Flights Table set_window ( "Flights Table" ,2); list_activate_item ( "Flight", "2452..." ); # Flight Reservation set_window ( "Flight Reservation" ,3); edit_set ( "Customer Name:","Bob Smith" ); button_press ( "Insert Order" ); 3 Using the Hand pointer, click on the object to synchronize 3 Locate the line in the script to insert the synchronization point 1 Select Create > Synchronization Point/For Object/Window Property 2
222. Add Synchronization to Test Script Wait for an Object State/Property Value list_select_item ( "Fly From:","Denver" ); list_select_item ( "Fly To:","San Francisco" ); # Flights Table set_window ( "Flights Table" ,2); list_activate_item ( "Flight", "2452..." ); # Flight Reservation set_window ( "Flight Reservation" ,3); edit_set ( "Customer Name:","Bob Smith" ); button_press ( "Insert Order" ); 3 "Progress Bar" Select the object attribute that will contain the value of the visual cue 4 Using the Hand pointer, click on the object to synchronize 3 Locate the line in the script to insert the synchronization point 1 Select Create > Synchronization Point/For Object/Window Property 2
223. Add Synchronization to Test Script Wait for an Object State/Property Value list_select_item ( "Fly From:","Denver" ); list_select_item ( "Fly To:","San Francisco" ); # Flights Table set_window ( "Flights Table" ,2); list_activate_item ( "Flight", "2452..." ); # Flight Reservation set_window ( "Flight Reservation" ,3); edit_set ( "Customer Name:","Bob Smith" ); button_press ( "Insert Order" ); 3 obj_wait_info ( "Progress Bar" , "label" , "Insert Done…”, 10); "Progress Bar" Click the Paste button in Wait for object window 5 Select the object attribute that will contain the value of the visual cue 4 Using the Hand pointer, click on the object to synchronize 3 Locate the line in the script to insert the synchronization point 1 Select Create > Synchronization Point/For Object/Window Property 2
224. Add Synchronization to Test Script Wait for a Bitmap Area 3 # Mercury Homepage set_window ( "Mercury Homepage" , 5 ); edit_set ( "Address", "http://www.merc-int.com” ); obj_mouse_click ( "mpage", "Img2" , 471, 328 ); Locate the line in the script to insert the synchronization point 1
225. Add Synchronization to Test Script Wait for a Bitmap Area # Mercury Homepage set_window ( "Mercury Homepage" , 5 ); edit_set ( "Address", "http://www.merc-int.com” ); obj_mouse_click ( "mpage", "Img2" , 471, 328 ); 3 Select Create > Synchronization Point > For Screen Area Bitmap 2 Locate the line in the script to insert the synchronization point 1
226. Add Synchronization to Test Script Wait for a Bitmap Area 3 # Mercury Homepage set_window ( "Mercury Homepage" , 5 ); edit_set ( "Address", "http://www.merc-int.com” ); obj_mouse_click ( "mpage", "Img2" , 471, 328 ); Click left mouse button and drag pointer to select area; press right button to complete selection 3 Select Create > Synchronization Point > For Screen Area Bitmap 2 Locate the line in the script to insert the synchronization point 1
227. Add Synchronization to Test Script Wait for a Bitmap Area 3 # Mercury Homepage set_window ( "Mercury Homepage" , 5 ); edit_set ( "Address", "http://www.merc-int.com” ); obj_wait_bitmap ( "mpage","Img2" ,6,7,8,101,114); obj_mouse_click ( "mpage", "Img2" , 471, 328 ); TSL statement appears in script 4 Locate the line in the script to insert the synchronization point 1 Click left mouse button and drag pointer to select area; press right button to complete selection 3 Select Create > Synchronization Point > For Screen Area Bitmap 2
239. Variables and Constants Variable and Constant Names: - letters, numbers, underscore - first character must be a letter or an underscore - case sensitive # Constant declarations public const GUI_FILE_PATH = “c:testsguifiles”; public const AUT_PATH = “c:appbin”; public const E_MY_ERROR_CODE = -12345; # Variable declarations static lineCounter ; public flightVersion = “Flight1a.exe”; Test Script 1 Examples GUI_load ( GUI_FILE_PATH & “myFile.gui”); invoke_application ( AUT_PATH & flightVersion , ““, AUT_PATH , SW_SHOW); ... rc = my_function (); if (rc == E_MY_ERROR_CODE ) ... Test Script 2
240. Variables and Constants Strings and Numbers number1 = "4" ; number2 = 3 ; value = number1 * number2; value contains 12 cost = "10 Dollars" ; amount = “The price is “ & cost + 5 ; amount contains “The price is 15” value_a = "3.3" ; value_b = "2,5" ; result_a = value_a * 2 ; result_b = value_b * 4 ; result_a contains 6.6 result_b contains 8 Sample 1 Sample 2 Sample 3 WinRunner can convert strings to numbers and vice versa! If a string is converted to a number, WinRunner cuts off all following non-numeric characters!
245. Arrays Multi-dimensional Arrays flightinfo[ 1 , "Date” ] = "07/22/99" ; flightinfo[ 1 , "FlyFrom” ] = "Los Angeles" ; flightinfo[ 1 , "FlyTo” ] = "Denver" ; flightinfo[ 1 , "Flight No” ] = "4300" ; flightinfo[ 2 , "Flight No” ] = "1234" ; flightinfo[ 3 , "Flight No” ] = "9999" ; Example: Multi-dimensional Array Date Fly From Fly To Flight No 1 2 3 07/22/99 09/28/01 12/26/02 Los Angeles Seattle Dallas Detroit Portland Denver 4300 1234 9999 Multi-dimensional Arrays; Data in table format
246.
247. Flow Control Conditional Decision Making set_window (“Flight Reservation”); obj_get_info (“Order No:”, “value”, OrderNo); if ( OrderNo == “ ” ) report_msg (“No order number.”); else button_press (“Update Order”); set_window (“Flight Reservation”); obj_get_info (“Order No:”, “value”, OrderNo); if ( OrderNo == “ ” ) { report_msg (“No order number.”); } else { button_press (“Update Order”); } win_get_text(”Flight Info”, version, 42, 68, 159, 89); if ( version != “Version 1.0” ) { report_msg (“Wrong Version!”); texit; } Example 2 Best practice: always set curly brackets Example 1
248. Flow Control switch Statement set_window ("Fax Order"); edit_get_text ("Class:", class); switch (class) { case "Economy": result = PASS; message="Correct class: Economy"; break; case "Business": result = FAIL; message="Wrong class: Business"; break; case "First": result = FAIL; message="Wrong class: First"; break; } tl_step (“Class of Service”, result, message); Example
249. Flow Control for Loop # Looping for stress testing for (i=0; i<1000; i++) { set_window (“Flight Reservation”); menu_select_item ("File;Fax Order..."); set_window ("Fax Order"); edit_set ("Fax Number:", “4085551212”); button_press (”Send"); set_window (“Flight Reservation”); obj_wait_info (“StatusBar”, “label”, “Fax Sent”, 50); } Example
250. Flow Control while Loop file= "c:dataflight_orders.txt"; file_open( file, FO_MODE_READ ); while ( file_getline( file, line ) == E_OK ) { ord_num= substr( line, 0, 5 ); open_order( ord_num ); report_msg( "Opened Order " & ord_num ); } file_close( file ); The statements in this while loop will not be executed if the condition is not TRUE (if the file cannot be opened) Example
251. Flow Control do while Loop # Flight Reservation set_window ( "Flight Reservation", 2 ); edit_set ( "Name:", "" ); new_len=0; do { old_len= new_len; edit_type( "Name:", "123" ); edit_get_info( "Name:", "value", value ); new_len= length( value ); } while( old_len < new_len ); report_msg( "Max Name length ” & new_len & " characters" ); The statements in this while loop are executed at least once. Example
252.
253. Operators Arithmetic/Relational edit_get_text ("Tickets", tickets); edit_get_text ("Price", price); edit_get_text ("Total", total); if ( tickets * price == total ) tl_step (“Total”, PASS, “Correct Total”); else { tl_step (“Total”, FAIL, "Wrong Total"); report_msg(“Expected Value: ” & tickets * price); report_msg(“Actual Value: ” & total ); } Best Practice: For complicated calculations, check values in the AUT against pre-calculated values in a data table or data file Example
254. Operators Logical Operators # Value is greater than 50 AND less than 100 if ( value > 50 && value <100 ) tl_step (“Value tested”, PASS, “Correct Value”); Logical AND # Value equals Saturday OR value equals Sunday if ( value== “Saturday” || value== “Sunday” ) tl_step (“Value tested”, PASS, “ it’s Weekend !”); Logical OR # Value is equal to or greater than 1 AND less than or equal to 10 # AND value IS NOT 5 if ( value >=1 && value <=10 && value != 5 ) tl_step (“Value tested ”, PASS, “is between 1-10 and not 5”); Combination
255.
256.
257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272. Creating a Startup Script ############################################ # TestSuite Training Init Test # ############################################ # Loading the prepared GUI file GUI_load ( getvar ( "testname" )& "flight60.gui" ); # Configure the MS Mask object to map to edit objec # Data of Flight recording depends on this set_class_map ( "MSMaskWndClass" , "edit" ); set_record_attr ( "MSMaskWndClass" , "class attached_t set_record_method ( "MSMaskWndClass" , RM_RECORD); # Configure the status bar in the GUI Map set_class_map ( "AfxWnd40" , "object" ); set_record_attr ( "AfxWnd40" , "class regexp_MSW_class S:estProjectnitScript WinRunner - [InitScript] Create a startup script in WinRunner. 1 Open the General Options window and click the Environment tab. 2 Enter the path where you saved your startup script in the Startup test box. 3