Automated Software Testing - University of New Hampshire · Automated Software Testing Presented...

Post on 30-Jun-2020

5 views 0 download

Transcript of Automated Software Testing - University of New Hampshire · Automated Software Testing Presented...

Automated Software Testing

Presented by: KC Ibey

Sponsored by: Philips Teletrol

Presentation Overview

O Software Testing

O Philips Teletrol

O Senior Project

O Selenium

O Questions

Types of Software Testing

O Functional Testing

O Non-Functional Testing

Non-Functional Testing

O Checks the robustness of a program

O Such as:

OResponse time

OStability (ability to handle multiple

requests)

Functional Testing

O Ensures that software meets and

continues to meet the

requirements of the program

Functional Testing Can Be Broken Down

O Unit Testing

O Acceptance Testing

O Regression Testing

Unit Testing

O First stage of testing

O Performed by the programmer

O Small units of code are tested as the

code is written

O Smaller units can be combined into

larger units called integrated testing

Acceptance Testing

O Final stage of testing

O Tester does not have to be a programmer or

know how the program is written

O Tester inputs information into the program &

verifies that the resulting output is correct

O Example: calculator program 2 + 3 = 5

Regression Testing

O Done after the program is complete

O Checks if a modification to the system or

program has caused a program failure

O Verifies that the code works per requirements

O Answers the questions:

O Can the user still do this?

O Does this feature still work?

Philips Teletrol

O Build energy management

systems

O Envoy

O Central access through a web

browser

What is an Energy Management System

O HVAC

O Lighting

O Metering

O Refrigeration monitoring

O Other customized system

Administrator Controls Remote Locations

Senior Project

O Mock customer webpage

O Created automated tests

O Ran tests

O Verified results

Manual vs. Automated

Manual Automated

O No start-up cost

O Labor intensive

O Tests not consistent

O High start-up cost

O Low labor cost (after

initial set-up)

O Tests consistent

Open Source Software Tests

Program Recorder Language Browsers Type of Test Info Available Comments

Selenium Yes, Selenium IDE C#, Java, Perl, PHP, Python,

Ruby IE, Firefox, Safari,

Opera Regression Test Yes

FitNesse No, Creat Testing

Tables Wiki IE, Firefox

Acceptance Test

Some Easy to create testing tables

WebSpec/Watij Java, Ruby IE, Safari Not Much

Selenium

O Create customized tests

O Create a suite of tests

O Create batch file to run suite

O Results are saved to a file

O Check the file for errors

Create a Customized Test

O Tests can be written in code

O Tests can be recorded in Firefox

Dropdown on Firefox Menu

Expand Web Developer Menu

Select Selenium IDE

Selenium IDE Recorder

Record A Test

Create Small Tests

O More versatile test suites

O Easier to troubleshoot error

O Large tests will require more maintenance

Create a Test Suite

O Create a library of

tests

O Build suite of tests

Test Results

Modifying Tests

O Open html file and modify Selenese code

O Open html file in Firefox recorder and modify

code

Open Suite in Firefox

Select Command

Select Command From Dropdown List

Reference Tab Displays Command Description

Parts of a Selenium Command

O Command - what to do

O Target - where or what to look for on a webpage

O Value - gives a value to use or compare something to

Issues I Encountered

Problem Solution

O <tr>

O <td>clickAndWait</td>

O <td>//input[@value='Submit']</td

>

O <td></td>

O </tr>

O <tr>

O <td>clickAndWait</td>

O <td>//input[@value='Back']</td>

O <td></td>

O </tr>

O <tr>

O <td>click</td>

O <td>//input[@value='Submit']</td

>

O <td></td>

O </tr>

O <tr>

O <td>waitForElementPresent</td>

O <td>//input[@value='Back']</td>

O <td></td>

O </tr>

O <tr>

O <td>clickAndWait</td>

O <td>//input[@value='Back']</td>

O <td></td>

O </tr>

Questions???

Special Thanks to

Philips Teletrol