Quick Test Professional 1. 2. 3. 4. 5. 6. 7. 8. 9.
Configuration of IIS (Internet Information Server) Creating Home Directory Creating Customized FTP Site Creating Customized HTTP Site Creation of Home Page and Configuration of Home Page Creation of Server Side Script Working with FTP Commands to Upload / Download Implementing Test with QTP VB Scripting
1. Configuration of IIS: Internet Information Server is a Web Server which servers with .html / .htm files this files can be analyzed on client machine with client software (Web Browser – Internet Explorer). Request: Every Request placed by client is given with a reference to URL – Uniform Resource Locator example: http://www.yahoo.com (Internet) http://localhost/ (Intranet) http://127.0.0.1 (Intranet) Response: It is given by Web Server in return to Request in form of HTML tags. These tags are filtered by Web browser and outputs are displayed without tags Practical Approach configure (FTP / HTTP) 1. Select (Start Run inetmgr) -- It activates IIS server if it is installed 2. If the Window does not appear perform the following steps a. Select Start Settings Control Panel Add / Remove Programs Add Remove Windows Component Select IIS and click on Details button Select FTP checkbox and click on OK / Next button b. Insert CD of Operating System if prompted 3. Select the Default HTTP Site Right Click the Mouse Select Stop 4. Select the Default FTP Site Right Click the Mouse Select Stop Creating Home Directory Any folder in Operating system can be considered as Home directory (Referred by FTP / HTTP Site) Practical Approach 1. Select (Start Run Cmd / Command) 2. c:\>md home 3. c:\>exit
Creating Customized HTTP Site: HTTP – Hyper Text Transmission Protocol. A HTTP Site is associated with Description, Home Directory Location and Privileges Practical Approach 1. Select Default Web Site in IIS window Right Click New Site Next 2. Provide the Description: myhttp 3. Click on Next button and select IP (Internet Protocol) Address from the drop down list: 127.0.0.1 4. Analyze the Port Number: 80 and click on Next 5. Specify the location of Home Directory: c:\home and click on Next 6. Provide all the privileges except (Write) 7. Click on Next / Finish Creation of Home Page and Configuration of Home Page Home Page is the first page displayed to the end user as a result of request to any web site (Internet / Intranet) Practical Approach 1. Select Start Run Notepad 2. Type the following Code <marquee>
My Home Page
Link to ASP Link to HTML 3. Save the file with the name as Index.html in c:\home directory 4. Analyze the http site on Web Browser (http://localhost) (http://127.0.0.1) Configuration of Home Page 1. Select the Newly created site in IIS Right Click Properties Select Documents Tab Remove the Existing files from the list Click on Add button to include (Index.html) Click on Apply / OK button 2. Analyze the Web site after configuration of Home page Creation of Server Side Script 1. Select Start Run Notepad
2. Type the following code <marquee>
My ASP Page
Back to Home Link to HTML <% response.write(“Hello World from ASP Code”) %> 3. Save the above code in (c:\home\sub.asp) 4. Analyze the asp file on browser Configuration of FTP Site Practical Approach 1. Select Default FTP Site in IIS window Right Click New Site Next 2. Provide the Description: myftp 3. Click on Next button and select IP (Internet Protocol) Address from the drop down list: 127.0.0.1 4. Analyze the Port Number: 21 and click on Next 5. Specify the location of Home Directory: c:\home and click on Next 6. Provide all the privileges (Read & Write) 7. Click on Next / Finish Working with FTP Commands 1. Analyze the FTP Services on Internet Information Server 2. Navigate to command prompt (Start Run Command / Cmd) 3. Perform the following Steps to Upload file from c:\> to FTP sites Home directory a. C:\> FTP 127.0.0.1 b. FTP> put Index.html (Single file upload) c. FTP> mput *.* (multiple file upload) d. FTP> bye 4. Perform the following steps to Down files from FTP Sites Home directory to the current systems local directory c:\> a. C:\> FTP yahoo.com b. FTP> get Index.html (Single file Download) c. FTP> mget *.* (Multiple file Download) d. FTP> bye
Note: After giving FTP Command it prompts to enter User ID and Password (anonymous /
[email protected]) Note: FTP Site can also be accessed from Browser Working with QTP 1. Start Programs Quick Test Professional Quick Test Professional
2. Add-ins window displays 3 default add-ins which can be enhanced by downloading additional add-ins from Internet Click on OK to logon to QTP Screen
3. Select Blank Test option 4. Analyze the Interface provided in QTP Note: Interface help can be accessed by selecting (Help Quick Test Professional Help QTP User Guide) Checkpoints in QTP Checkpoints are used to analyze the expected properties and the actual properties associated with windows and web based applications. QTP Provides eight checkpoints which helps in verification of objects placed in windows and web applications 1. 2. 3. 4. 5. 6. 7. 8.
Standard Checkpoint Text Checkpoint Text Area Checkpoint Bitmap checkpoint Database Checkpoint Accessibility Checkpoint XML Checkpoint (Application) XML File Checkpoint (Source)
Implementing Test on Web Sites (Web Applications) 1. Check for the availability of sample web site Example: http://localhost/MercuryWebTours/ 2. Start recording functional operation on sample web site (F3) 3. Perform functional operations on sample web site 4. Stop Recording functional operations (F4) 5. Playback the Recorded Actions (F5)
6. Analyze the test results in test results window after performing playback process Implementing Test on Windows based Application 1. Check the location of application EXE 2. Start Recording functional operation on application EXE Example: Flight application 3. Stop recording after performing functional operations on application under test 4. Playback the recorded actions and analyze the test results Implementing Standard Checkpoint 1. Start Recording functional operations on windows / Web application 2. Implement checkpoint (Insert Checkpoint Standard Checkpoint) point the object and click once to capture the expected properties from the object in application under test 3. Stop Recording 4. Playback and analyze the test results before and after changing the properties associated with application object Implementing Bitmap checkpoint 1. Activate application under test with a picture placed 2. Start recording functional operations and implement checkpoint (Insert Checkpoint Bitmap checkpoint) 3. Point the bitmap image and click once to capture the expected bitmap 4. Playback the Action recorded before and after modification of Bitmap in application under test Implementing Database checkpoint Pre-requisites for database checkpoint 1. Database, table, records must be existing 2. DSN Should be configured Practical Approach 1. Select (Insert Checkpoint Database Checkpoint) 2. Select specify SQL Statement manually and click on Next button 3. Provide the DSN Path and type the SQL Statement (Flights32 / Select * from flights) 4. Playback the script and analyze the test results based on expected and data in database table before and after performing (DML) operations Text Checkpoint: It helps in analysis of text placed in web site or text in Windows application
1. Start recording functional operation and implement checkpoint (Insert Checkpoint Text Checkpoint) 2. Point the object where the text is appearing and click once to capture the text as expected 3. Playback the script before and after modification of text on web / windows application Text Area Checkpoint: It helps in analysis of text placed in a specific area of web / Windows application 1. Start recording functional operation and implement checkpoint (Insert Checkpoint Text Area Checkpoint) 2. Mark the area where the text is appearing and Right click to capture the text as expected 3. Playback the script before and after modification of text on web / windows application Accessibility Checkpoint It helps in analysis of access level fixed in Internet explorer (Restrictions implemented on browsing) XML Checkpoint / XML File Checkpoint It helps in detailed analysis of user-defined tags created with the help of XML. The checkpoint returns error if the tags are not ended properly XML Checkpoint focuses on the current page of web site where as XML Checkpoint with a reference to file checks for xml file stored in local directory