+ All Categories
Home > Documents > GUI Testing and Rational Robot [email protected] Models and Analysis of Software Lecture...

GUI Testing and Rational Robot [email protected] Models and Analysis of Software Lecture...

Date post: 26-Mar-2015
Category:
Upload: michelle-montgomery
View: 216 times
Download: 0 times
Share this document with a friend
Popular Tags:
24
GUI Testing and Rational Robot GUI Testing and Rational Robot Jerzy.Nawrocki@ put . poznan . pl www.cs.put.poznan.pl/ jnawrocki/models/ Models and Analysis of Software Lecture 1 Copyright, 2003 Jerzy R. Nawrocki
Transcript
Page 1: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

GUI Testing and Rational RobotGUI Testing and Rational Robot

[email protected]/jnawrocki/models/

Models and Analysis of SoftwareLecture 1

Copyright, 2003 Jerzy R. Nawrocki

Page 2: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

IntroductionIntroduction

The main problemwith test-first coding

is GUI testing.[IEEE Soft]

Page 3: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

Introduction – What is Rational Robot?Introduction – What is Rational Robot?

Baseline Baseline

Robot

Page 4: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

Introduction – Rational Robot and test-first codingIntroduction – Rational Robot and test-first coding

Remarks:

• When you start testing an application is ready.

• Rational Robot is for regression testing, not for test-first coding.

• The only chance for test-first coding is SQABasic.

Page 5: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

Testing HTML ApplicationsTesting HTML Applications

StartBrowser [ URL$, ] [ WindowTag= Name$ ]

• Starts the browser,• enables HTML testing, and • loads a page if specified.

Web page address

Identifies this instance of the browser

StartBrowser "http://www.cs.put.poznan.pl/jnawrocki/models/", "WindowTag= Parent"

Page 6: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

Testing HTML ApplicationsTesting HTML Applications

Browser action$, recMethod$, parameters$

• Performs an action on a Web browser

Back, Forward, NewPage, SetFrame,

CloseWin, ..

Wait= % default

time is 30s

Browser NewPage, ""

HTMLTitle=$, Name=$,

"" ..

Wait for the topmost frame

Page 7: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

Testing HTML ApplicationsTesting HTML Applications

HTML action%, recMethod$, parameters$

• Performs a mouse action on an HTML tag.

Click, .. Coords= x, y

HTML Click, "Name= Autor", "Coords= 10,12"

HTMLTitle=$, Name=$,

"" ..

Page 8: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

ExampleExample

Page 9: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

ExampleExample

Page 10: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

ExampleExample

NAME= "komendy"

NAME = "tablica”

NAME= "Ogloszenia"

Dodaj ogłoszenieTablica ogłoszeń

Page 11: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

ExampleExample

NAME= "komendy"

NAME = "tablica”

NAME= "Data"

NAME= "Autor"

NAME= "Tekst"

NAME="Submit" NAME="Reset"

Dodaj ogłoszenieTablica ogłoszeń

Page 12: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

ExampleExample

Sub Main

Dim Result As Integer

 

'Initially Recorded: 03-03-12 08:56:25

'Script Name: test7

 ...........................

End Sub

Page 13: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

ExampleExample

NAME= "komendy"

NAME = "tablica”

NAME= "Ogloszenia"

Dodaj ogłoszenie

Tablica ogłoszeń

Page 14: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

ExampleExample

StartBrowser "C:\Jurek\Teaching\models\index.html", "WindowTag=WEBBrowser" Window SetContext, "WindowTag=WEBBrowser", "" Browser SetFrame,"Type=HTMLFrame;HTMLId=komendy","" Browser NewPage,"","" HTMLLink Click, "Type=HTMLLink;HTMLText=Dodaj ogłoszenie", ""

Page 15: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

ExampleExample

NAME= "komendy"

NAME = "tablica”

NAME= "Data"

NAME= "Autor"

NAME= "Tekst"

NAME="Submit" NAME="Reset"

Dodaj ogłoszenieTablica ogłoszeń

Page 16: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

ExampleExample

Browser SetFrame,"Type=HTMLFrame;HTMLId=tablica","" Browser NewPage,"","" HTMLDocument Click, "Type=HTMLDocument;Index=1", "Coords=25,14" InputKeys "{TAB}2002-12-31{TAB}J.Nawrocki{TAB}1.IV.03 nie ma wykladu z Mode" InputKeys "ls and Analysis of Software."

Page 17: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

ExampleExample

NAME= "komendy"

NAME = "tablica”

NAME= "Data"

NAME= "Autor"

NAME= "Tekst"

NAME="Submit" NAME="Reset"

Dodaj ogłoszenieTablica ogłoszeń

Page 18: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

ExampleExample

Browser SetFrame,"Type=HTMLFrame;HTMLId=komendy","" HTMLLink Click, "Type=HTMLLink;HTMLText=Tablica ogłoszeń", ""

Page 19: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

ExampleExample

NAME= "komendy"

NAME = "tablica”

NAME= "Ogloszenia"

Dodaj ogłoszenieTablica ogłoszeń

Page 20: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

ExampleExample

Browser SetFrame,"Type=HTMLFrame;HTMLId=tablica","" Browser NewPage,"","" Result = HTMLTableVP (CompareData, "Type=HTMLTable;Index=1", "VP=Weryfikacja autora") Result = HTMLTableVP (CompareData, "Type=HTMLTable;Index=1", "VP=Weryfikacja daty")

Page 21: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

Baseline filesBaseline files

TestDatastore\DefaultTestScriptDatastore\TMS_Script\vp\test7.Weryfikacja autora.base.grd

Page 22: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

SummarySummary

Test-first coding for GUI is a real Test-first coding for GUI is a real problem.problem.

Rational Robot is for regression Rational Robot is for regression testing, not for test-first coding.testing, not for test-first coding.

SQABasic is an interesting language SQABasic is an interesting language but it is not clear how to use it for but it is not clear how to use it for test-first coding of GUI.test-first coding of GUI.

Further research is necessary to Further research is necessary to solve the problem.solve the problem.

Page 23: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

BibliographyBibliography

Using Rational Robot, Version Using Rational Robot, Version 2001.03.002001.03.00

SQABasic Language Reference, SQABasic Language Reference, Version 2001.03.00Version 2001.03.00

Page 24: GUI Testing and Rational Robot Jerzy.Nawrocki@put.poznan.pl  Models and Analysis of Software Lecture 1 Copyright,

QuestionsQuestions??


Recommended