版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
.TestDesignforBetterTestAutomation.Whoisyour
speaker?LogiGear
Corporation?
SiliconValley
andVietnam?
Testing
andtest
automationservices:?
consultancy,
training?
test
developmentandautomationservices?
"test
integrated"
developmentservices?
Products:?
TestArchitect?,
TestArchitect
for
VisualStudio??
integratingtest
developmentwithtest
managementandautomationHans
Buwaldahans@@hansbuwalda?
Dutchguy,
inCaliforniasince2001?
Backgroundinmath,computerscience,management?
Focusingonkeyword
testing,agiletesting,bigtestingFrom
TheNetherlands(Holland)ZwolleZwolle
(茲沃勒)We
like
to
ridebikesAmericaNetherlandsOften
hard
to
keep
upfor
QASCRUMPROJECTSprintSprintSprintSPOPOPOPODevDevDevDevQAQAQACooperationinateamisimportantfor
QA.Ifthatsuffers
QAwillfall
evenfurtherbehind...Tests
andtheirscalabilityDon'tjust
automate
manualtestingDon'tjust
automate
manualtestingDon'tjust
automate
manualtestingGoodautomatedtestingisnotthesameasautomatinggoodmanualtesting...Example
Scripting(Selenium)WebElementelement=driver.findElement(B(name));element.sendKeys("mysterymagic");element.submit();???(newWebDriverWait(driver,10)).until(newExpectedCondition<Boolean>(){publicBooleanapply(WebDriverd){returnd.getTitle().toLowerCase().startsWith("mystery");}});System.out.println(driver.getTitle());UsingActionsfragmentfromatest
withactionsreadfromtopto
bottom4actions,eachwithanactionkeywordandarguments?
Writethetestasactions,inaspreadsheet?
Eachactionhasanameandarguments?
Automatetheactions,notthetests?
Eachactionisautomatedonlyonce,easytomaintainVariables
andexpressions
withkeywords?
Use">>"to
assignavalue
to
avariable?
Use"#"to
start
anexpressionUseexisting
actionsto
make
new
actions?
We
use"enter","click"and"check"to
make
anewaction?
Thenewactioniscalled"checkbalance"?
Argumentsare
usedwith"#"defineinoneplace:usemany
timesintests:3ways
to
implementactions?
Withactiondefinitions?
useexisting
actionsto
create
newones?
seethepreviousslide?
Low
level
(UI,etc)
actionscan
bebuilt-ininthetool?
like
"click","selectmenuitem",etc?
TestArchitect
has381ofsuchbuilt-inactions?
Canprogram
inaprogramming
language?
like
C#,PythonorJavaExample
actionimplementationinPythonScriptfor
anactionchecksortorder,to
verifywhethertherows
inatableare
sorted:defaction_checkSortOrder():#gettableobject,columnnumberandcolumncountwindowName=LIBRARY.NamedArgument("window")get
argumentsfromthetest
linefindthetableintheUItableName=LIBRARY.NamedArgument("table")columnName=LIBRARY.NamedArgument("column")table=ABT.OpenElement(windowName,tableName)column=table.GetColumnIndex(columnName)rowCount=table.GetRowCount()#checkthesortorder,rowbyrowprevious=table.GetCellText(0,column)foriinrange(1,rowCount):ifavalueissmallerthanbefore,
failthetestcurrent=table.GetCellText(i,column)if
current<previous:LIBRARY.AdministerCheck("order","sorted",
"fails
"
+
str(i+1),
0)returnprevious=currentifallrows
areascending,passthetestLIBRARY.AdministerCheck("order","sorted",
"all
rows
in
order",
1)Usingthenew
action?
By
keeping
anactiongenericitcan
beappliedfor
avariety
ofsituations?
Someexamples
ofusing"checksortorder":Behavior
DrivenDevelopment
(BDD)?
Usesnatural
languagescenarios"sweater"
--毛線衣?
Tools
like
JBehave
andCucumbermaptheseto
code?
Structureis"Given-When-Then"(GWT)?
Example:Given
acustomerpreviouslyboughtablacksweater
from
meAndIcurrentlyhave
three
blacksweaters
left
instockWhenhereturns
thesweater
for
arefundThenIshouldhave
four
blacksweaters
instock(source:Wikipedia)BDDwithactions(example
1)BDDwithActions(example
2)Givenacustomerpreviouslyboughtablacksweater
frommeAndIcurrentlyhave
threeblacksweaters
leftinstockWhenhereturnsthesweater
for
arefundThenIshouldhave
four
blacksweaters
instockRisks
ofkeyword
approaches?
Keywords
are
notamagicsolutionto
allproblems?
Withmany
tests
andkeywords
maintenance
can
stillbehardThemethodIwillshowyou
today:"ActionBasedTesting"Mystatement
ontest
automation...Issuesare
notalways
obvious...DowntonAbbey(唐頓莊園)Why
Better
Test
Design?QualitywillbebetterAutomationwillbeeasierExample
ofaTestisthisagoodtest?isitgoodfor
automation?BDDscenario...GivenUserturnsoff
PasswordrequiredoptionforDrive
TestAndUserhasloggedinby
Traffic
ApplicantaccountAndUserisatthe
Assessments
Take
a
Test
pageAndUserclicksthe
TrafficTest
linkAndUserclickstheNextbuttonAndUserclickstheSheetradiobuttoninModepageifdisplayedAndUserclickstheStartbuttonAndUserwaitsforteststartAndUserclickstheStop
Test
buttonWhenUserclickstheConfirmStop
Test
buttonAndUserentersthecorrectapplicantpasswordAndUserclickstheConfirmStop
Test
buttonThen
The
Test
isOvershouldbedisplayedintheMessagelabelAndthevalueoftheMessagelabelshouldbe
ThetestisoverAnd
TheWelcometo
TrafficTesting
pageshouldbedisplayedTheTest
AutomationDesignParadox悖論Test
ModuleObjectivesInitial-setupTest
casesFinal-cleanup(1)Early
intheproject:identifythetest
modulesthesebecometheclosettester,
engineersandproductownerscandothistogetherwithlabeled(empty)shelvesthatthetestswillbestored
inlater(2)Duringtheproject:fitthetests
into
themodulesbutdon'thidetoomuch,infothatisneededto
understandatest
shouldbevisibleonlyuseactionsandchecksthatfitthescopeofthemoduleavoidunnecessarydetails,hidethemintheactionsOverview
ActionBased
TestingHighLevelTest
DesignTest
Module1Test
Module2ObjectivesTest
ModuleNObjectives...ActionsAUTOMATIONinteractiontestbusinesstestBreakdown
Criteria?
CommonCriteria?
Functionality
(customers,finances,managementinformation,UI,...)?
Architectureofthesystem
undertest
(client,server,
protocol,subsystems,components,modules,...)?
Kindoftest
(navigationflow,
negative
tests,
responsetime,...)?
AdditionalCriteria?
Stakeholders
(like
"Accounting","Compliance","HR",...)?
Complexityofthetest
(putcomplextestsinseparate
modules)?
Executionaspects(specialhardware,
multi-station,...)?
Projectplanning(availabilityofinformation,timelines,sprints,...)?
Risks
involved
(extra
test
modulesfor
highriskareas)?
Ambitionlevel
(smoke
test,
regression,aggressive,…)For
moreinformation,andexamples,seethearticlesonmy
website:Eye
ontheball,Scope?
Always
knowthescope
ofthetest
module?
Thescope
shouldbeclearandunambiguous?
Thescope
determines
many
things:?
whatthetest
objectivesare?
whichtest
casesto
expect?
whatlevel
ofactions
to
use?
whatthechecks
are
aboutandwhichevents
shouldgenerate
awarningorerror(ifa“l(fā)ower”
functionalityiswrong)Usetheright
level
actionsHidedetailsiftheydon'tmatter
(don'tfitthescopeofthetest):however
......showdetailsiftheydomatter.
Thislinefor
example
isunclear:???Tip:have
default
values
for
argumentsACTIONDEFINITIONloginnameargument
userargument
passworddefaultvaluetestertesterpwwindowloginwindow
usernameloginwindow
passwordcontrolvalue#user#passwordenterenterwindow
controlloginwindow
loginclickSometimesexplicitvaluesare
needed:Usuallydefaultvaluesare
goodenough:datepayeemake
payment
1/1/12
GasCo.
85.00amounttextHelloTamaracheckmessageNon-UI?
Examples?
web
services(RESTandSOAP)?
applicationprogramminginterfaces
(API’s)?
embeddedsoftware?
protocols?
files,batches?
databases,SQL?
commandlineinterfaces
(CLI’s)?
multi-media?
Canbetarget
oftests,
and/or
automationinterfaces?
Non-UIautomationcan
speedupfunctionaltests
that
donotaddress
theUI?
butitcan
alsocomplicatethemMultipleSystem
AccessTest
Modules,drivingeitheroneormultipleinterfacesAutomationprotocolaccessUIaccessSystem
UnderTestAPIaccessdatabaseaccessExample
approach:usinganagentdoasmuchaspossibleheredoaslittleaspossiblehereHostDeviceABTAutomationAgentSoftwareUnderTestInterfaceInfoAndroidCarDiagnosticMobileDevicesPoint
ofSaleTerminalsGames,VRSystemsMultimedia:The"checkpicture"Approach?
Approachapplicablefor
pictureslike
graphicsoricons?
Thetester
willaddaline"checkpicture",thatincludesa"question"asoneofthearguments?
Whilethetest
isexecuted
TA
keeps
therecordedpictures?
Afterexecutionthepicturesare
shownto
amanualtestingfor
approval?
Onceapprovedunchangedsamepictureswon'tbepresented
to
themanualtester
againinfuturerunsAbsolute
andrelative
picture
checks?
Relativepicturechecksare
partoftest
module?
Theydepictimagesthatare
specificfor
thatmodule?
Exampleachartbasedoncalculations.Inanothermodulethechartwilltypicallybedifferent
(basedonadifferent
calculation)?
Absolutepicturechecksrefer
to
picturesthatoccurinmultipletests,
basedonconditions,butalways
thesameimage?
Theirnamesstart
with"/"?
Typical
use:iconsorpictograms:?
asatester
you
usuallydon'tcare
aboutthedesignofanicon,butwhetheritappearsw
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 深度學(xué)習(xí)技術(shù)在教師教學(xué)反思中的應(yīng)用與專業(yè)成長路徑探究教學(xué)研究課題報告
- 山東高速云南發(fā)展有限公司2025年下半年招聘備考題庫及一套答案詳解
- 山西大地環(huán)境投資控股有限公司2025年社會招聘備考題庫附答案詳解
- 2026年江漢藝術(shù)職業(yè)學(xué)院單招職業(yè)適應(yīng)性測試題庫新版
- 2026年天津商務(wù)職業(yè)學(xué)院單招職業(yè)傾向性測試模擬測試卷必考題
- 2026年電工分析考試題庫完整答案
- 2026浙江臺州市科技館招聘編制外勞動合同人員2人備考題庫新版
- 工業(yè)和備考題庫化部工業(yè)文化發(fā)展中心2025年公開招聘社會在職人員備考題庫及答案詳解一套
- 顧客服務(wù)滿意度提升指南(標準版)
- 2026年江蘇城市職業(yè)學(xué)院單招職業(yè)適應(yīng)性測試題庫新版
- 安徽省九師聯(lián)盟2025-2026學(xué)年高三(1月)第五次質(zhì)量檢測英語(含答案)
- (2025年)四川省自貢市紀委監(jiān)委公開遴選公務(wù)員筆試試題及答案解析
- 2026屆江蘇省常州市高一上數(shù)學(xué)期末聯(lián)考模擬試題含解析
- 2026年及未來5年市場數(shù)據(jù)中國水質(zhì)監(jiān)測系統(tǒng)市場全面調(diào)研及行業(yè)投資潛力預(yù)測報告
- 2026安徽省農(nóng)村信用社聯(lián)合社面向社會招聘農(nóng)商銀行高級管理人員參考考試試題及答案解析
- 強夯地基施工質(zhì)量控制方案
- 藝考機構(gòu)協(xié)議書
- 2025年12月27日四川省公安廳遴選面試真題及解析
- 2025-2030中國海洋工程裝備制造業(yè)市場供需關(guān)系研究及投資策略規(guī)劃分析報告
- 《生態(tài)環(huán)境重大事故隱患判定標準》解析
- 2025年度吉林省公安機關(guān)考試錄用特殊職位公務(wù)員(人民警察)備考筆試試題及答案解析
評論
0/150
提交評論