Transcript Testing
Supplemental Testing
CSE
CSE
2102
2102
Prof. Steven A. Demurjian
Computer Science & Engineering Department
The University of Connecticut
371 Fairfield Road, Box U-2155
Storrs, CT 06269-2155
[email protected]
http://www.engr.uconn.edu/~steve
(860) 486 – 4818
(860) 486 – 3719 (office)
1
Overview of Supplemental Testing
CSE
2102
Explore Five Different Categories of Testing
Unit and White-Box Testing
User Interface Testing
Black Box Testing
General Performance Testing
Software Quality Attainment
Discuss each Category in Detail
Available Tools and Techniques
Examples of Test Cases/Results
2
Unit and White-Box Testing
CSE
2102
Focused on Functional and Correctness of Code
Procedural Language
Check Functions
For C, .h/.c Combinations
Object-Oriented Language
Method Based Testing
Public for other Users of Class
Protected (Ancestor to Descendant)
Private (Inaccessible Outside the Class)
How would you Test Mobile Apps like PHA?
What Else Might you Focus on?
3
Unit and White-Box Testing
CSE
2102
Myriad of Products Available
junit junit.sourceforge.net/
Objective-C OCUnit cocoadev.com/wiki/OCUnit
Check for C check.sourceforge.net/
C/C++ https://code.google.com/p/googletest/
MS Test for Visual Studio
Mobile Platforms
Titanium Recommends jsunity (Javascript)
Sensa Touch (Selenium, CasperJS, Siesta)
4
Unit and White-Box Testing
CSE
2102
Also Includes General Testing of Capabilities
Assume that GUIs are Working Correctly
Now, Test Particular Feature Under Different Cases
CT Insurance – Renew Licenses on Periodic Basis
Scan Batches of Submitted Renewals
Renewal Form(s) + check(s)
Need to Test all Possible Combinations
Does System Work as Expected
5
Testing Producer Licenses
CSE
CSE
2102
2102
6
Testing Producer Licenses
CSE
CSE
2102
2102
7
User Interface Testing
CSE
2102
Extensive Tests of Business Function and Logic
Utilized Business Process Logic
Often Provide by Domain Expert
Does Graphical User Interface Behave as Expected?
Is Each Screen Sufficient?
Are Screens Correctly Linked?
Are Data Entries Checked for Validity?
No illegal dates
Only numbers in zips and phone numbers
Only valid states
Consistency of State and Zip Code?
Do Required Minimums work?
Think about all you do when you use a web site!
8
User Interface Testing – Varies by Domain
CSE
2102
E-Commerce
Focused on correctly Registering User, Processing
an Order, Account Maintenance, etc.
Mostly Mouse/Keyboard Oriented
Gaming
Checking that all of the buttons (on touch screen)
and/or options work correctly
Check to be sure there is consistency in placement
across multiple screens
Mobile Apps
Linkages to other Apps (Facebook, etc.)
Checking individual screens, order of screens
Minimums need to be able to complete a screen to
submit or go to the next screen
9
Sample from TestScenario.pdf
CSE
CSE
2102
2102
10
Sample from TestScenario.pdf
CSE
CSE
2102
2102
11
Sample from TestScenario.pdf
CSE
CSE
2102
2102
12
Sample from TestScenario.pdf
CSE
CSE
2102
2102
13
Sample from TestScenario.pdf
CSE
CSE
2102
2102
14
WebTesting.pdf – Results from Testers
CSE
CSE
2102
2102
15
WebTesting.pdf – Results from Testers
CSE
CSE
2102
2102
16
WebTesting.pdf – Results from Testers
CSE
CSE
2102
2102
17
LicenseTesting.pdf – Java Application
CSE
CSE
2102
2102
GUI Changes: Look and Feel/Readability/Usability
18
LicenseTesting.pdf – Java Application
CSE
CSE
2102
2102
Top :
GUI Issue
Bottom:
DB Issue
19
LicenseTesting.pdf – Java Application
CSE
CSE
2102
2102
Both are Business Logic to be Enforced by GUI
20
Black Box Testing
CSE
2102
Treat Class, Procedure, Function, as a Black Box
Given “What” Box is Supposed to Do
Understand its Inputs and Expected Outputs
Execute Tests and Assess Results
Formulate Test Cases Based on What Program is
Supposed to Do without Knowing
Programming Paradigm (OO, Functional, etc.)
Code Structure (Modularity, Inheritance, etc.)
Inputs
Class
Procedure
Function
Expected
Outputs
No Access to Code
Usually Testing Software Engineer Speciality
21
Black Box Testing for PHA
CSE
2102
If PHA as Deployed App, what would you Test?
Testing when User has MSHV Account? w/o?
Testing Creation of New Medication
Create, Store, Logoff, Logon and see
After Create/Store, logon to MSHV Directly
Testing Entry of Information on Condition
Different Conditions
Can you Check these in MSHV?
Testing Entry on Exercise
Create, Store, Logoff, Logon and see
After Create/Store, logon to MSHV Directly
What Else Might be Tested?
22
Black Box Testing in CSE4940
CSE
2102
Senior Design Project Sequence
Have Teams Exchange “Compiled Code”
Each Team Provide Test Cases/Scenarios
What are Objectives of Testing Engineers?
Run All Tests Given
Tweak Tests
Try to Break “Code”
Crazy Input
Unexpected Actions
One Important Tool to Assist in Testing:
Screen Capture and Annotation
Available Packages:
http://camstudio.org/ or http://www.wisdomsoft.com/products/screenhunter_free.htm
23
General Performance Testing
CSE
2102
Focus on the Actual Performance of Code
Specific Portions of Code
Sorting or Searching Algorithms
Key Time Critical Functional Capabilities
Role of Database
Explore Volume of Information from Database
Explore Concurrent Access to Database
Interactions Across Network
Explore Potential Bottlenecks in Network Traffic
Examine Potential Issues Across Hardware Platforms
Overhead Regarding Logging/Transaction Tracking
Including Actual Calls to System Clock in Code
Often Consider a Software Architecture View
24
Where are Potential Bottlenecks?
CSE
2102
Medication/
Supplement
Interaction Checker
PHA Provider
ODL and Chronic
Disease Analyzer
Medication & Observations of
Chronic Disease Daily Living (ODL)
Management
PHA Patient
Apache/Tomcat
Web/Application
Server
MySQL
Database
Server
OpenEMR
Personal Health
Record (PHR)
Microsoft
Healtvault
Figure 1: Architecture Diagram of the Project this Semester.
25
Where are Potential Bottlenecks?
CSE
CSE
2102
2102
XACML
XML-RR
Health Vault
Middle-Layer Server
Harvard
SMART
EMR
ASP.Net API
SMART
Container
RDF
XML
MS
Health
Vault
XACML
Rest API
RDF-RR
JSON
JSON
SMARTSync
Personal Health Assistant (PHA)
Patient App
•
•
•
•
Medications
Allergies
Procedures
Demographic
Provider List
Security Policies
JSON
Proivder App
•
•
•
•
Medications
Allergies
Procedures
Demographic
RxTerms
NDF-RT
RxNorm
Patient List
Authorization by Role
26
Testing Web and Mobile Applications
CSE
2102
Stress testing
What points the application breaks
Simulate Traffic
Increased Hits to Application or Web Server
Increased Simultaneous Users at Client Side
What are Available Tools?
jmeter (http://jmeter.apache.org) sends multiple
http requests to check traffic capacity
http://www.webperformance.com/ load testing of
web apps – can record and replay testing
27
Testing Gaming Applications
CSE
2102
How Would you Test Massively Multiplayer Online
Games?
What are Some of Issues?
Size of “World”
Maintain World over Time
Ability to Generate and Manipulate Maps
Interactions with Players in Real Time
Number of Concurrent Players
Game State Size to Save
Does Game Every Stop?
What other Things Might you Test?
28
Testing Databases
CSE
2102
Database are Tested from Varied Perspectives
SQL Injection Testing
Web GUIs – What if User Puts in DB Command
for an Address?
SELECT BDATE, ADDRESS
FROM EMPLOYEE
WHERE FNAME='John' AND MINIT='B’
AND LNAME='Smith’
Can Someone Access Database Directly?
https://addons.mozilla.org/en-us/firefox/addon/sql-inject-me/
Specialized Database Testing
DBUnit (http://www.dbunit.org/) complements
JUnit
Search and Test large repositories
29
Software Quality Attainment
CSE
2102
How would you Measure Non-Functional Qualities:
Understandability, maintainability
Evolvability, user friendliness
Many Questions to Consider:
Is your system each to understand from both the developer
and end user perspectives?
How can you demonstrate its maintainability?
Was there a recent problem that you identified and fixed,
and if so, was it easy or hard?
Can you make changes easily?
Was there an evolution you had to do in the last prototype
that wasn’t anticipated, and if so, was it difficulty or easy?
How user friendly is your system?
Did you get any feedback from the black box testing?
See: http://www.softwareqatest.com/index.html and
http://www.aptest.com/resources.html
30