SlideShare uma empresa Scribd logo
1 de 10
If you have not yet done so, you should complete the Module 05
lab before working on this activity.
Design a small suite of tests for your Web application. This
suite should include:
Functional Testing, such as:
· Checking links
· Test Web forms
· Validate CSS tags
· Validate Javascript tags
Database Testing, such as:
· A search that returns a single record
· A search that returns no records
· A search the returns multiple records
Browser Compatibility Testing
· Function with some browser features turned off (e.g.,
Javascript)
Make sure you add comments to your test scripts to explain
what is happening with each test case. Include your name with
the comments as well.
Submit your test code files to your instructor as a ZIP file
named <first_initial><Last_name>_Mod05Dev.zip. So a student
Edith Palka would name her file epalka_Mod05Dev.zip
Module 05 Lab WorksheetBuilding a Test Plan
Lab Activities:· What is Web Application Testing?·
Introduction to Selenium· Creating a Test Case: Recording·
Creating a Test Case: Scripting· Creating a Test Suite
Introduction
At this point you should have, at minimum:
· An IDE (Integrated Development Environment) for your code
· An SQL administration utility (command-line, desktop or
Web-based)
· A MySQL database dbtest.
· A basic Web search form for dbtest that will let the user
search by surname
In addition, to complete this lab you will need to have the
following software installed:
· Mozilla Firefox (https://www.mozilla.org/en-US/firefox/new/)
· Java
(http://www.oracle.com/technetwork/java/javase/downloads/jre8
-downloads-2133155.html)
This lab assumes that you have a working knowledge of HTML,
CSS and Javascript.
What is Web Application Testing?
Web applications are like any other software. They need to be
tested before they are unleashed on the world.
Software testing and test development are normally the subject
of an entire course, so this lab is meant to give you an overview
and let you experiment with developing your own Web
application tests.
There are five basic categories of software tests:
· Functional Testing - Does the application work according to
specifications? Does it produce the correct output for a given
input? How does it handle errors?
· Compatibility Testing - Does it work with different browsers?
Different operating systems? DIfferent hardware?
· Database Testing - Does the information displayed in the
application match what’s in the database? Does the database
correctly display any updates from the application?
· Security Testing - Does the application handle potentially
malicious inputs gracefully? Does it give away information that
could aid an attacker?
· Performance Testing - Will the application handle the
proposed workload? How stable is it under load? How well does
the application scale?
Software testing is an important part of the development
lifecycle and the more rigorous, the better. Fortunately there are
many tools that make creating and running tests easier. In this
lab we’re going to look at Selenium, an open-source Web
testing tool.
Introduction to Selenium
Selenium isn’t a single tool but a suite of interoperable
programs and plug-ins. The three main components are:
· Selenium Server - This is a Java command line application
that processes your test scripts and controls the Web browser
through the appropriate Webdriver.
· Selenium IDE - This is a Mozilla Firefox plugin that lets you
create and run tests and test suites
· Webdriver - This is a software interface between the Selenium
Server and the browser under test. The Firefox Webdriver is
installed by default with the IDE, but you will need to install
drivers for all of the browsers you plan on testing. If you’re
running Windows, you will need to make sure you install the
Internet Explorer Webdriver.
Since the native format for a Selenium test case is HTML, you
can create and edit them in any text editor.
Selenium downloads - http://docs.seleniumhq.org/download/
Test Scripting
Selenium has a native scripting language. Commands have three
parts and act on a Base URL:
<command> <target> <value>
The target and value parameters are optional and depend on the
command. The Base URL is the address of the Web page under
test and all target paths in the test are relative to that URL.
For example, with the Base URL set to http://www.google.com:
open /
will open the main Google search page. No additional value is
required. Modifying the Base URL lets you use the same test
cases with different sites.
Test cases are saved as HTML files. Here’s the source code for
the previous test case, with the command and target in bold:
<table>
<tr><td>open</td><td>/</td><td></td></tr>
</table>
Each row is three columns wide with the columns containing the
command name, target and value, respectively.
Note that even if the command doesn’t require a target or value,
those other fields must be present.
You can create a test suite (a collection of tests that run one
after the other) by writing an HTML file that links to individual
test cases, like so:
<html>
<head>
<title>Test Suite 1</title>
</head>
<body>
<table>
<tr><td><b>Suite Of Tests</b></td></tr>
<tr><td><a href="./mail.html">Mail</a></td></tr>
<tr><td><a href="./Search.html">Test Search</a></td></tr>
<tr><td><a href="./Print.html">Test Print</a></td></tr>
</table>
</body>
</html>
This defines a table with each row linking to a different test
case file. You can reference additional commands and examples
at the Selenium IDE home page
http://docs.seleniumhq.org/docs/02_selenium_ide.jsp
Like any other HTML file, you can add comments to make
maintaining and updating your code easier. This is strongly
recommended.
You can also write test cases in other languages such as Java,
PHP, C#, Objective-C, Python and Javascript.Installation
· Selenium IDE - Go to the Downloads page listed above using
Firefox and when you click on the IDE download, Firefox will
ask you to approve the install. Do so. The browser will offer to
restart to activate the plugins. Let it.
· Selenium Server - Download it to your Inisope project
directory so you can find it later.
· WebDrivers - These let you control various browsers. Each
browser has its own WebDriver. The Firefox WebDriver is
installed by default. Download any additional WebDrivers you
may need for the other browsers you want to test.
Start up the Selenium Server from the command line (assuming
for this example that the server file is named selenium-server-
standalone-2.28.0.jar):
(Mac OS X and Linux):
java -jar selenium-server-standalone-2.28.0.jar
(Windows, all on one line)
java -jar selenium-server-standalone-2.28.0.jar -
Dwebdriver.ie.driver=.
On Windows, you might get a security pop-up that asks you to
confirm that you’re okay with Java having local network access.
The IDE will start recording browser actions automatically
when started.
We want to change that.
In Firefox, select Tools->Add-ons.
Under Extensions, select Selenium IDE->Preferences
The preferences dialog box will open:
Uncheck Start recording immediately on open. Click OK to save
your changes.
Open the Selenium IDE from the Firefox Tools menu and we’ll
create a simple test.Creating a Test Case: Recording
The simplest way to build a test is by having Selenium record
your actions in the browser. Starting the IDE
Open the IDE in Firefox by clicking on Tools->Selenium IDE.
The IDE will start up in a separate window:
Recording our Test Case
Make sure your VM is up and running.
Set the Base URL in the IDE to a Web site of your choice
Click on the Record button in the IDE (upper right corner).
In Firefox, browse to the Web page you selected earlier.
Right-click on any element in the page (ex. image, text, video)
and select a test from the context menu presented.
Do this for at least four more elements in the page.
Click on the Record button to stop recording and save your test
case in your Inisope project directory as TestCase01.html.
In the main IDE window, select the Source tab, then copy and
paste your test case script source here:
Here are some of the commands your test may have used:
· open - pretty straightforward. It just opens a Web page to the
URL relative to the Base URL.
· verifyText - This checks to see that the specified text shows
up in the browser, then logs success or failure before moving to
the next command.
· assertText - This is similar to verifyText except that if the
specified text fails to show up, the test will end. There is
another command, waitForText, that will wait a specified
amount of time for the given text. If it doesn’t show up in time,
the test halts. (This is useful for performance testing.)
Creating a Test Case: Scripting
Recording a test doesn’t always give you the control that you
want so once you’re comfortable with the scripting language
you can write your own test cases using your favorite text
editor.
The easiest way to create a script is to record a set of actions
that approximate what you want and then modify that test script
to fine-tune it. You can also modify an existing test case.
Make a copy of TestCase01.html and call it TestCase02.html.
Delete the final command and change it to a command that will
store the text value of the page title into a Javascript variable
called title_main.
Run the script to make sure it works, then copy and paste it
here.
Creating a Test Suite
You can create a test suite (a collection of test cases that run
one after the other) by writing an HTML file that links to
individual test cases, like so:
<html>
<head>
<title>My First Test Suite</title>
</head>
<body>
<table>
<tr><td><b>Suite Of Tests</b></td></tr>
<tr><td><a href="./mail.html">Mail</a></td></tr>
<tr><td><a href="./Search.html">Test Search</a></td></tr>
<tr><td><a href="./Print.html">Test Print</a></td></tr>
</table>
</body>
</html>
Notice that we are still using the table tag but this time each
row represents a link to a test case file instead of a single test
command. This also lets us modify individual test cases without
having to change any of the others as well as re-use our test
cases in multiple test suites.
Take the two test cases we previously created and write a test
suite file that calls them in sequence. Load the test suite into
the Selenium IDE and verify that both cases run properly.
Close the IDE window.
Stop the Selenium Server with <Ctrl>-C.
Archive your lab worksheet and test files in a single Zip file
named <initial><surname>_wk5lab.zip. For example, if your
name is Edith Palka, you would create a file named
epalka_wk5lab.zip. Submit this file to your instructor.
1

Mais conteúdo relacionado

Semelhante a If you have not yet done so, you should complete the Module 05 lab.docx

Selenium tutorial
Selenium tutorialSelenium tutorial
Selenium tutorialmindqqa
 
Selenium introduction and some feautures
Selenium introduction and some feauturesSelenium introduction and some feautures
Selenium introduction and some feautureszahid32
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With SeleniumJodie Miners
 
Steps to write Selenium
Steps to write Selenium  Steps to write Selenium
Steps to write Selenium Rohit Thakur
 
Selenium testing IDE 101
Selenium testing IDE 101Selenium testing IDE 101
Selenium testing IDE 101Adam Culp
 
Selenium by using JAVA
Selenium by using JAVASelenium by using JAVA
Selenium by using JAVAmahirayavarapu
 
Selenium Ide Tutorial
Selenium Ide TutorialSelenium Ide Tutorial
Selenium Ide Tutorialmetapix
 
Selenium IDE Introduction, Installation and Working
Selenium IDE Introduction, Installation and WorkingSelenium IDE Introduction, Installation and Working
Selenium IDE Introduction, Installation and WorkingDisha Srivastava
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With SeleniumMarakana Inc.
 
Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01
Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01
Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01Aravindharamanan S
 

Semelhante a If you have not yet done so, you should complete the Module 05 lab.docx (20)

Selenium tutorial
Selenium tutorialSelenium tutorial
Selenium tutorial
 
Selenium introduction and some feautures
Selenium introduction and some feauturesSelenium introduction and some feautures
Selenium introduction and some feautures
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With Selenium
 
Steps to write Selenium
Steps to write Selenium  Steps to write Selenium
Steps to write Selenium
 
Codeception
CodeceptionCodeception
Codeception
 
Sel
SelSel
Sel
 
Selenium Testing
Selenium Testing Selenium Testing
Selenium Testing
 
10071756.ppt
10071756.ppt10071756.ppt
10071756.ppt
 
SKILLWISE_SELENIUM
SKILLWISE_SELENIUMSKILLWISE_SELENIUM
SKILLWISE_SELENIUM
 
Selenium classes in mumbai
Selenium classes in mumbaiSelenium classes in mumbai
Selenium classes in mumbai
 
Selenium Primer
Selenium PrimerSelenium Primer
Selenium Primer
 
Selenium testing IDE 101
Selenium testing IDE 101Selenium testing IDE 101
Selenium testing IDE 101
 
Qa process
Qa processQa process
Qa process
 
Selenium by using JAVA
Selenium by using JAVASelenium by using JAVA
Selenium by using JAVA
 
Selenium Ide Tutorial
Selenium Ide TutorialSelenium Ide Tutorial
Selenium Ide Tutorial
 
Selenium
SeleniumSelenium
Selenium
 
Selenium IDE Introduction, Installation and Working
Selenium IDE Introduction, Installation and WorkingSelenium IDE Introduction, Installation and Working
Selenium IDE Introduction, Installation and Working
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With Selenium
 
Selenium IDE
Selenium IDESelenium IDE
Selenium IDE
 
Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01
Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01
Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01
 

Mais de wilcockiris

Barbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docx
Barbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docxBarbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docx
Barbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docxwilcockiris
 
BARGAIN CITY Your career is moving along faster than you e.docx
BARGAIN CITY Your career is moving along faster than you e.docxBARGAIN CITY Your career is moving along faster than you e.docx
BARGAIN CITY Your career is moving along faster than you e.docxwilcockiris
 
Barbara schedules a meeting with a core group of clinic  managers. T.docx
Barbara schedules a meeting with a core group of clinic  managers. T.docxBarbara schedules a meeting with a core group of clinic  managers. T.docx
Barbara schedules a meeting with a core group of clinic  managers. T.docxwilcockiris
 
Barbara schedules a meeting with a core group of clinic managers.docx
Barbara schedules a meeting with a core group of clinic managers.docxBarbara schedules a meeting with a core group of clinic managers.docx
Barbara schedules a meeting with a core group of clinic managers.docxwilcockiris
 
Barbara schedules a meeting with a core group of clinic managers. Th.docx
Barbara schedules a meeting with a core group of clinic managers. Th.docxBarbara schedules a meeting with a core group of clinic managers. Th.docx
Barbara schedules a meeting with a core group of clinic managers. Th.docxwilcockiris
 
Barbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docx
Barbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docxBarbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docx
Barbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docxwilcockiris
 
BARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docx
BARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docxBARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docx
BARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docxwilcockiris
 
Banks 5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docx
Banks    5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docxBanks    5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docx
Banks 5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docxwilcockiris
 
Banking industry•Databases that storeocorporate sensiti.docx
Banking industry•Databases that storeocorporate sensiti.docxBanking industry•Databases that storeocorporate sensiti.docx
Banking industry•Databases that storeocorporate sensiti.docxwilcockiris
 
BAOL 531 Managerial AccountingWeek Three Article Research Pape.docx
BAOL 531 Managerial AccountingWeek Three Article Research Pape.docxBAOL 531 Managerial AccountingWeek Three Article Research Pape.docx
BAOL 531 Managerial AccountingWeek Three Article Research Pape.docxwilcockiris
 
bankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docx
bankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docxbankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docx
bankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docxwilcockiris
 
Barbara and Judi entered into a contract with Linda, which provi.docx
Barbara and Judi entered into a contract with Linda, which provi.docxBarbara and Judi entered into a contract with Linda, which provi.docx
Barbara and Judi entered into a contract with Linda, which provi.docxwilcockiris
 
bappsum.indd 614 182014 30258 PMHuman Reso.docx
bappsum.indd   614 182014   30258 PMHuman Reso.docxbappsum.indd   614 182014   30258 PMHuman Reso.docx
bappsum.indd 614 182014 30258 PMHuman Reso.docxwilcockiris
 
Bank ReservesSuppose that the reserve ratio is .25, and that a b.docx
Bank ReservesSuppose that the reserve ratio is .25, and that a b.docxBank ReservesSuppose that the reserve ratio is .25, and that a b.docx
Bank ReservesSuppose that the reserve ratio is .25, and that a b.docxwilcockiris
 
Bank Services, Grading GuideFIN366 Version 21Individual.docx
Bank Services, Grading GuideFIN366 Version 21Individual.docxBank Services, Grading GuideFIN366 Version 21Individual.docx
Bank Services, Grading GuideFIN366 Version 21Individual.docxwilcockiris
 
Baldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docx
Baldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docxBaldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docx
Baldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docxwilcockiris
 
Bank confirmations are critical to the cash audit. What information .docx
Bank confirmations are critical to the cash audit. What information .docxBank confirmations are critical to the cash audit. What information .docx
Bank confirmations are critical to the cash audit. What information .docxwilcockiris
 
BalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docx
BalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docxBalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docx
BalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docxwilcockiris
 
BAM 515 - Organizational Behavior(Enter your answers on th.docx
BAM 515 - Organizational Behavior(Enter your answers on th.docxBAM 515 - Organizational Behavior(Enter your answers on th.docx
BAM 515 - Organizational Behavior(Enter your answers on th.docxwilcockiris
 
BalanchineGeorge Balanchine is an important figure in the histor.docx
BalanchineGeorge Balanchine is an important figure in the histor.docxBalanchineGeorge Balanchine is an important figure in the histor.docx
BalanchineGeorge Balanchine is an important figure in the histor.docxwilcockiris
 

Mais de wilcockiris (20)

Barbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docx
Barbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docxBarbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docx
Barbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docx
 
BARGAIN CITY Your career is moving along faster than you e.docx
BARGAIN CITY Your career is moving along faster than you e.docxBARGAIN CITY Your career is moving along faster than you e.docx
BARGAIN CITY Your career is moving along faster than you e.docx
 
Barbara schedules a meeting with a core group of clinic  managers. T.docx
Barbara schedules a meeting with a core group of clinic  managers. T.docxBarbara schedules a meeting with a core group of clinic  managers. T.docx
Barbara schedules a meeting with a core group of clinic  managers. T.docx
 
Barbara schedules a meeting with a core group of clinic managers.docx
Barbara schedules a meeting with a core group of clinic managers.docxBarbara schedules a meeting with a core group of clinic managers.docx
Barbara schedules a meeting with a core group of clinic managers.docx
 
Barbara schedules a meeting with a core group of clinic managers. Th.docx
Barbara schedules a meeting with a core group of clinic managers. Th.docxBarbara schedules a meeting with a core group of clinic managers. Th.docx
Barbara schedules a meeting with a core group of clinic managers. Th.docx
 
Barbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docx
Barbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docxBarbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docx
Barbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docx
 
BARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docx
BARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docxBARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docx
BARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docx
 
Banks 5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docx
Banks    5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docxBanks    5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docx
Banks 5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docx
 
Banking industry•Databases that storeocorporate sensiti.docx
Banking industry•Databases that storeocorporate sensiti.docxBanking industry•Databases that storeocorporate sensiti.docx
Banking industry•Databases that storeocorporate sensiti.docx
 
BAOL 531 Managerial AccountingWeek Three Article Research Pape.docx
BAOL 531 Managerial AccountingWeek Three Article Research Pape.docxBAOL 531 Managerial AccountingWeek Three Article Research Pape.docx
BAOL 531 Managerial AccountingWeek Three Article Research Pape.docx
 
bankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docx
bankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docxbankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docx
bankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docx
 
Barbara and Judi entered into a contract with Linda, which provi.docx
Barbara and Judi entered into a contract with Linda, which provi.docxBarbara and Judi entered into a contract with Linda, which provi.docx
Barbara and Judi entered into a contract with Linda, which provi.docx
 
bappsum.indd 614 182014 30258 PMHuman Reso.docx
bappsum.indd   614 182014   30258 PMHuman Reso.docxbappsum.indd   614 182014   30258 PMHuman Reso.docx
bappsum.indd 614 182014 30258 PMHuman Reso.docx
 
Bank ReservesSuppose that the reserve ratio is .25, and that a b.docx
Bank ReservesSuppose that the reserve ratio is .25, and that a b.docxBank ReservesSuppose that the reserve ratio is .25, and that a b.docx
Bank ReservesSuppose that the reserve ratio is .25, and that a b.docx
 
Bank Services, Grading GuideFIN366 Version 21Individual.docx
Bank Services, Grading GuideFIN366 Version 21Individual.docxBank Services, Grading GuideFIN366 Version 21Individual.docx
Bank Services, Grading GuideFIN366 Version 21Individual.docx
 
Baldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docx
Baldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docxBaldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docx
Baldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docx
 
Bank confirmations are critical to the cash audit. What information .docx
Bank confirmations are critical to the cash audit. What information .docxBank confirmations are critical to the cash audit. What information .docx
Bank confirmations are critical to the cash audit. What information .docx
 
BalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docx
BalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docxBalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docx
BalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docx
 
BAM 515 - Organizational Behavior(Enter your answers on th.docx
BAM 515 - Organizational Behavior(Enter your answers on th.docxBAM 515 - Organizational Behavior(Enter your answers on th.docx
BAM 515 - Organizational Behavior(Enter your answers on th.docx
 
BalanchineGeorge Balanchine is an important figure in the histor.docx
BalanchineGeorge Balanchine is an important figure in the histor.docxBalanchineGeorge Balanchine is an important figure in the histor.docx
BalanchineGeorge Balanchine is an important figure in the histor.docx
 

Último

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 

Último (20)

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 

If you have not yet done so, you should complete the Module 05 lab.docx

  • 1. If you have not yet done so, you should complete the Module 05 lab before working on this activity. Design a small suite of tests for your Web application. This suite should include: Functional Testing, such as: · Checking links · Test Web forms · Validate CSS tags · Validate Javascript tags Database Testing, such as: · A search that returns a single record · A search that returns no records · A search the returns multiple records Browser Compatibility Testing · Function with some browser features turned off (e.g., Javascript) Make sure you add comments to your test scripts to explain what is happening with each test case. Include your name with the comments as well. Submit your test code files to your instructor as a ZIP file named <first_initial><Last_name>_Mod05Dev.zip. So a student Edith Palka would name her file epalka_Mod05Dev.zip Module 05 Lab WorksheetBuilding a Test Plan Lab Activities:· What is Web Application Testing?· Introduction to Selenium· Creating a Test Case: Recording· Creating a Test Case: Scripting· Creating a Test Suite Introduction At this point you should have, at minimum: · An IDE (Integrated Development Environment) for your code · An SQL administration utility (command-line, desktop or Web-based) · A MySQL database dbtest.
  • 2. · A basic Web search form for dbtest that will let the user search by surname In addition, to complete this lab you will need to have the following software installed: · Mozilla Firefox (https://www.mozilla.org/en-US/firefox/new/) · Java (http://www.oracle.com/technetwork/java/javase/downloads/jre8 -downloads-2133155.html) This lab assumes that you have a working knowledge of HTML, CSS and Javascript. What is Web Application Testing? Web applications are like any other software. They need to be tested before they are unleashed on the world. Software testing and test development are normally the subject of an entire course, so this lab is meant to give you an overview and let you experiment with developing your own Web application tests. There are five basic categories of software tests: · Functional Testing - Does the application work according to specifications? Does it produce the correct output for a given input? How does it handle errors? · Compatibility Testing - Does it work with different browsers? Different operating systems? DIfferent hardware? · Database Testing - Does the information displayed in the application match what’s in the database? Does the database correctly display any updates from the application? · Security Testing - Does the application handle potentially malicious inputs gracefully? Does it give away information that could aid an attacker? · Performance Testing - Will the application handle the proposed workload? How stable is it under load? How well does the application scale?
  • 3. Software testing is an important part of the development lifecycle and the more rigorous, the better. Fortunately there are many tools that make creating and running tests easier. In this lab we’re going to look at Selenium, an open-source Web testing tool. Introduction to Selenium Selenium isn’t a single tool but a suite of interoperable programs and plug-ins. The three main components are: · Selenium Server - This is a Java command line application that processes your test scripts and controls the Web browser through the appropriate Webdriver. · Selenium IDE - This is a Mozilla Firefox plugin that lets you create and run tests and test suites · Webdriver - This is a software interface between the Selenium Server and the browser under test. The Firefox Webdriver is installed by default with the IDE, but you will need to install drivers for all of the browsers you plan on testing. If you’re running Windows, you will need to make sure you install the Internet Explorer Webdriver. Since the native format for a Selenium test case is HTML, you can create and edit them in any text editor. Selenium downloads - http://docs.seleniumhq.org/download/ Test Scripting Selenium has a native scripting language. Commands have three parts and act on a Base URL: <command> <target> <value> The target and value parameters are optional and depend on the command. The Base URL is the address of the Web page under test and all target paths in the test are relative to that URL. For example, with the Base URL set to http://www.google.com: open /
  • 4. will open the main Google search page. No additional value is required. Modifying the Base URL lets you use the same test cases with different sites. Test cases are saved as HTML files. Here’s the source code for the previous test case, with the command and target in bold: <table> <tr><td>open</td><td>/</td><td></td></tr> </table> Each row is three columns wide with the columns containing the command name, target and value, respectively. Note that even if the command doesn’t require a target or value, those other fields must be present. You can create a test suite (a collection of tests that run one after the other) by writing an HTML file that links to individual test cases, like so: <html> <head> <title>Test Suite 1</title> </head> <body> <table> <tr><td><b>Suite Of Tests</b></td></tr> <tr><td><a href="./mail.html">Mail</a></td></tr> <tr><td><a href="./Search.html">Test Search</a></td></tr> <tr><td><a href="./Print.html">Test Print</a></td></tr> </table> </body> </html>
  • 5. This defines a table with each row linking to a different test case file. You can reference additional commands and examples at the Selenium IDE home page http://docs.seleniumhq.org/docs/02_selenium_ide.jsp Like any other HTML file, you can add comments to make maintaining and updating your code easier. This is strongly recommended. You can also write test cases in other languages such as Java, PHP, C#, Objective-C, Python and Javascript.Installation · Selenium IDE - Go to the Downloads page listed above using Firefox and when you click on the IDE download, Firefox will ask you to approve the install. Do so. The browser will offer to restart to activate the plugins. Let it. · Selenium Server - Download it to your Inisope project directory so you can find it later. · WebDrivers - These let you control various browsers. Each browser has its own WebDriver. The Firefox WebDriver is installed by default. Download any additional WebDrivers you may need for the other browsers you want to test. Start up the Selenium Server from the command line (assuming for this example that the server file is named selenium-server- standalone-2.28.0.jar): (Mac OS X and Linux): java -jar selenium-server-standalone-2.28.0.jar (Windows, all on one line) java -jar selenium-server-standalone-2.28.0.jar - Dwebdriver.ie.driver=.
  • 6. On Windows, you might get a security pop-up that asks you to confirm that you’re okay with Java having local network access. The IDE will start recording browser actions automatically when started. We want to change that. In Firefox, select Tools->Add-ons. Under Extensions, select Selenium IDE->Preferences The preferences dialog box will open: Uncheck Start recording immediately on open. Click OK to save your changes. Open the Selenium IDE from the Firefox Tools menu and we’ll create a simple test.Creating a Test Case: Recording The simplest way to build a test is by having Selenium record your actions in the browser. Starting the IDE Open the IDE in Firefox by clicking on Tools->Selenium IDE. The IDE will start up in a separate window: Recording our Test Case Make sure your VM is up and running. Set the Base URL in the IDE to a Web site of your choice Click on the Record button in the IDE (upper right corner). In Firefox, browse to the Web page you selected earlier. Right-click on any element in the page (ex. image, text, video)
  • 7. and select a test from the context menu presented. Do this for at least four more elements in the page. Click on the Record button to stop recording and save your test case in your Inisope project directory as TestCase01.html. In the main IDE window, select the Source tab, then copy and paste your test case script source here: Here are some of the commands your test may have used:
  • 8. · open - pretty straightforward. It just opens a Web page to the URL relative to the Base URL. · verifyText - This checks to see that the specified text shows up in the browser, then logs success or failure before moving to the next command. · assertText - This is similar to verifyText except that if the specified text fails to show up, the test will end. There is another command, waitForText, that will wait a specified amount of time for the given text. If it doesn’t show up in time, the test halts. (This is useful for performance testing.) Creating a Test Case: Scripting Recording a test doesn’t always give you the control that you want so once you’re comfortable with the scripting language you can write your own test cases using your favorite text editor. The easiest way to create a script is to record a set of actions that approximate what you want and then modify that test script to fine-tune it. You can also modify an existing test case. Make a copy of TestCase01.html and call it TestCase02.html. Delete the final command and change it to a command that will store the text value of the page title into a Javascript variable called title_main. Run the script to make sure it works, then copy and paste it here.
  • 9. Creating a Test Suite You can create a test suite (a collection of test cases that run one after the other) by writing an HTML file that links to individual test cases, like so: <html> <head> <title>My First Test Suite</title> </head> <body> <table> <tr><td><b>Suite Of Tests</b></td></tr> <tr><td><a href="./mail.html">Mail</a></td></tr> <tr><td><a href="./Search.html">Test Search</a></td></tr> <tr><td><a href="./Print.html">Test Print</a></td></tr> </table> </body> </html>
  • 10. Notice that we are still using the table tag but this time each row represents a link to a test case file instead of a single test command. This also lets us modify individual test cases without having to change any of the others as well as re-use our test cases in multiple test suites. Take the two test cases we previously created and write a test suite file that calls them in sequence. Load the test suite into the Selenium IDE and verify that both cases run properly. Close the IDE window. Stop the Selenium Server with <Ctrl>-C. Archive your lab worksheet and test files in a single Zip file named <initial><surname>_wk5lab.zip. For example, if your name is Edith Palka, you would create a file named epalka_wk5lab.zip. Submit this file to your instructor. 1