groupstudentmain

studentmain  时间:2021-01-12  阅读:()
Proceedingsofthe3rdInternationalConferenceonComputingandInformatics,ICOCI2011,8-9June,2011Bandung,IndonesiaPaperNo.
021226ANIMPROVEDALGORITHMINTESTCASEGENERATIONFROMUMLACTIVITYDIAGRAMUSINGACTIVITYPATHNorLailyHashim1,YasirD.
Salman21UniversitiUtaraMalaysia,Malaysia,laily@uum.
edu.
my2UniversitiUtaraMalaysia,Malaysia,s820400@uum.
edu.
myABSTRACT.
ThispaperproposedanimprovedalgorithmtoautomaticallygeneratetestcasesdirectlyfromUMLactivitydiagramusinganactivitygraph.
ThisalgorithmhasbeenimplementedasaprototypeusingUMLactivitydiagramsasinputstogeneratetestcases.
Thesegeneratedtestcasesaregeneratedautomaticallyarecomparedtotestcasesthataregeneratedmanuallyinordertoevaluatethealgorithm'susabilityandreliability.
Theresultshowsthatthetestcasesgeneratedbythedevelopedtestcasegeneratorprogramarethesameastheonemanuallyderived.
Keywords:testcasegeneration,automatedgeneration,testcaseINTRODUCTIONTestcasegenerationisoneofthemostimportantelementsforthetestingeffortsforprogramsandapplications(Linzhangetal.
,2004).
Itisespeciallycomplicatedwhenasystemcontainssimultaneouslyexecutingparticipants,sinceasystemlikethatcanshowdifferentresponsesdependingonthesimultaneousoccurrenceconditions.
AUnifiedModellingLanguage(UML)activitydiagramisasuitablemodellinglanguagefordescribinginteractionsbetweensystemobjectsgiventhatanactivitydiagramcanbeconvenientlyusedtocapturebusinessprocesses,workflowsandinteractionscenarios(Kimetal.
,2007).
ManyhavegeneratedtestcasesfromUMLactivitydiagramsbygeneratingthemmanuallytotestthesystem(Linzhangetal.
,2004;Kundu&Samanta,2009;Kimetal.
,2007).
Manygeneratetestcasesautomaticallyusingdifferentmethods(Chenetal.
,2009;Javed,Strooper&Watson,2009),howevernoneofthesestudieshasrevealedthealgorithmthattheyhaveused.
Kundu&Samanth(2009)havedevelopedanalgorithmtogeneratetestcasesusingactivitypaths.
Theiralgorithmhasneverbeenimplementedandthisalgorithmneedsanactivitygraphthathasbeengeneratedmanuallyfromtheactivitydiagram.
Theiralgorithmalsoneedstoenterthetypeofeachnodemanuallyandapplysomerulestogettheresultpaths.
ThispaperfocusesonextendingKundu&Samanth(2009)'salgorithmusedingeneratingtestcasesusingUMLactivitydiagrambyapplyingactivitypathapproach,inwhichthetestcasesaregeneratedautomaticallygenerated.
Theactivitypathisamethodtocalculateallpossiblepathsfromtheactivitydiagrams,convertedeachnumberinthepathtoitsoriginaldata,andfromtherewillgeneratethetestcases.
Proceedingsofthe3rdInternationalConferenceonComputingandInformatics,ICOCI2011,8-9June,2011Bandung,IndonesiaPaperNo.
021227BACKGROUNDThefollowingarethemainconceptsappliedinthisstudy.
UMLActivityDiagramUMLisastandardthatcontainsalargesetofmodellingconceptsthatarerelatedincomplexways.
SinceUMLbecameastandardofOMGin1997,UMLmodelshavebecomemainclassofartefactsinsoftwaredevelopmentprocesses.
UMLprovidesanumberofdiagramstodescribedifferentaspectsofsoftwareartefacts.
UMLactivitydiagramsillustratethesequentialcontrolflowsofactivities.
Theycanbeusedtorepresentcontrolflowofanoperationormodelthedynamicaspectsofagroupofobjects,whichformakindofdesignspecificationsforprograms(Chenatal.
,2009).
Inordertodirectlyreusetheactivitydiagramsmodelingofanoperationasatestmodeltogeneratetestcases,itisnecessarytofollowthetestabilityrequirement.
Anactivitydiagramshouldonlyhaveoneinitialactivitystate,pairofbranchesandmerges,pairofforksandjoins.
Theownerobjectofeachactivitystateshouldbelabeledbyswimlanes,orbelabeledinthenameofactivitystate.
Everynodeotherthantheinitialnodeandfinalnodehasatleastoneoutgoingedgeandoneincomingedge,whichmeansallnodesarereachable.
Anyforknodeonlyhastwoexitedges.
Concurrentactivitystateswillnotaccessthesameobjectandonlyexecuteasynchronously(Linzhangetal.
,2004).
ActivitygraphAnactivitygraphisadirectedgraphwhileitsconstructisrepresentedbyeachnodeintheactivitygraph(initialnode,decisionnode,flowfinalnode,guardcondition,joinnode,forknode,etc.
),andfromthateachborderoftheactivitygraphsymbolizesthestreamintheactivitydiagram.
Furthermore,theactivitygraphasshowninFigure1summarizesassembleofanactivitydiagraminanorganizedwaywhichcanbeusedforfurtherautomation(Kundu&Samanta,2009).
Thesenodesareusedfortestcasegenerationduetotheircapabilityfordetectingmorefaultsinthesynchronizationandloopfaultsthantheotherapproaches.
Inadditiontheabilitytoidentifylocationofthefaultswillhelptoreducetestingaffordandhavingmodel-basedtestcasegenerationtoimproveanddevelopdesignquality.
Furthermore,ithasapossibilitytobuiltautomaticallyprototypefortheactivitygraph.
ThealgorithmbyKundu&Samanta(2009)hastakentheactivitygraphasaninputandtheoutputfromitwillbetheactivitypath.
Furthermore,thegeneratedpathswillneedsomeofrulestoapplyontheresultpathstogetallthepossiblepathsthatwillbeneededtogeneratethetestcases.
Figure1.
ActivityGraphforloginscreenProceedingsofthe3rdInternationalConferenceonComputingandInformatics,ICOCI2011,8-9June,2011Bandung,IndonesiaPaperNo.
021228TestCaseGenerationTestcasegenerationhasattractedmoreandmoreresearchattention(Cartaxo,Neto&Machado,2007;Chenatal.
,2009;Heumann,2001;Javed,Strooper,&Watson,2007;Kimetal.
,2007;Kundu&Samanta,2009;Linzhangatal.
,2004;Mingsong,Xiaokang,&Xuandong,2006).
LargenumberofthemfocusedonUMLactivitydiagramasabasedtogeneratethetestcase(Chen,atal,2009;Kundu&Samanta,2009;Kim,Kang,Baik,&Ko,2007;Linzhangatal.
,2004;Mingsong,Xiaokang,&Xuandong,2006),andnoneofthemrevealtheirproposedapproachesoralgorithms,orsharetheirtestingimplementationconductedduringthetesting.
Atestcasespecifiesasetoftestinputs,expectedresults,andexecutionconditionsdevelopedtoverifyobservancewithaspecificrequirementorimplementaparticularprogrampath(Lilly&G,2010).
PROPOSEDALGORITHMFORGENERATINGTESTCASESThefollowingalgorithmwillgenerateallthepossiblepathsfromtheactivitydiagram,andfromtheresultpaths,testcaseswillbegenerated.
Thisalgorithmisevaluatedintermsofitsusabilityandreliabilitybycomparingmanualtestcaseswithtestcasesautomaticallygeneratedfromtheprototypeofthisalgorithm.
ThemanualtestcasesareobtainedfromAlshammari(2010),wherefourtestcasesforstudentfunctionalitiesfromUniversitiUtaraMalaysialearningmanagementsystemcalled,LearningZoneareused.
Thefunctionsarelogin,downloadassignment,changepassword,andforumsearch.
Duetospacelimitation,onlyoneLoginfunctionisusedandpresentedinthispaper.
Algorithm1:GenerateTestCasePartA:variablesusedintheAlgorithmInput:anactivitydiagramOutput:testcaseTofindthenumberofpaths,thefollowingarethevariablesused:TDN-thenumberofnodewhichhastwodirections.
RNN-thenumberofreturnnode.
TDNI-thenumberoftwodirectionsinsideeachreturnnode.
RNNI-thenumberofreturnnodeinsideeachreturnnode.
Basicpathswiththereturnpathsnumber(BPR)=TDN+1Basicpathsnumber(BP)=BPR-RNNNumberofpathsafterreturn(PAR)=TDNI-RNNIThenumberofallpaths(AP)=BP+PAR(s)PartB:Pseudocodeofmethodssupportedinthealgorithm1.
Tofindthebasicpathswiththereturnpaths,thefollowingarethevariablesused:a.
Node-toputthenodesb.
LoopFlag-tokeeptrackoftheloopc.
N1-forthefirstnextofthenodesd.
N2-forthesecondnextofthenodese.
Nodeflag–forkeepingtrackofthevisitednodesf.
End–forknowtheendofthepathBeginLoopFlag=TDN,Node=firstnode,Nodeflag=0,End=trueWhileLoopFlagisnotemptydoWhileEndistruedoProceedingsofthe3rdInternationalConferenceonComputingandInformatics,ICOCI2011,8-9June,2011Bandung,IndonesiaPaperNo.
021229If(it'sthefirstnode)thenputthefirstnodeinthepath;PutthenodefirstnextinN1anditssecondnextinN2;If(N1=0)thenputendtotrue;If(NodeFlag=0andN2=0)thenputN1forthenextnodeinthepath;Elseif(NodeFlag=0andN2!
=0)thenputN1forthenextnodeinthepathandputNodeFlag=1,putNodeFlag=NodeFlag–thenumberoftwodirectionnodebeforeit;Elseif(NodeFlag=1andN2!
=0)thenputN2forthenextnodeinthepathandputNodeFlag=2;Putthenextnodeofthepathasthecurrentnode;EndPutthepathinarray;End2.
Tofoundallthepaths(AP)DuplicatethepathsthathavewithoutEndtothe(TDNI+RNNI)number;Putthereturnpathsinsideittocontinueittothenumberofpathsinsidethereturnpath;Finisheachonefromthesizebasicpaths;Thatwillgeneratethepossiblepaths.
3.
Fromthesaveinformationofeachnode,printoutthedetailsofeachpathtothelastone,whatwillgiveusthetestcase.
AutomaticgenerateforthetestcasefromtheloginactivitydiagramFirst:Usetheactivitydiagram,asshowninFigure2togeneratethetestcasefromit.
Figure2.
ActivityDiagramfor"Login"Usingthealgorithmexplainedearlier,theprototypewillgeneratethefollowingresultasshowninFigure3No.
ofTimes>N>Y>>Proceedingsofthe3rdInternationalConferenceonComputingandInformatics,ICOCI2011,8-9June,2011Bandung,IndonesiaPaperNo.
021230Figure3.
Theprogramresultforthe"login"activitydiagramThisresultcontainsallpossiblepathsthataregeneratedfromthealgorithmbasedongivenactivitydiagramasshowninFigure3.
Thedetailforeachpathtogetherwithsavednodesisusedtogeneratethetestcases.
ThetestcasesgeneratedforLoginactivitydiagramcanbeseeninTable1inthelastcolumn.
Columntwoshowsthebranchconditionsthateachpathfollows.
Table1.
Thegeneratedtestcasesfor"Login"TestcaseSequenceofBranchConditionsActivitySequence1RegID=InvalidTryagain=NoDisplay:Loginhereusingyourusernameandpassword,Display:Sorry,youhaveexceededtheallowednumberofloginattempts.
Restartyourbrowser.
2RegID=ValidDisplay:Loginhereusingyourusernameandpassword,Launchstudentmainviewpage.
3RegID=InvalidTryagain=YesRegID=InvalidTryagain=NoDisplay:Loginhereusingyourusernameandpassword,Display:Invalidlogin,pleasetryagain.
Display:Loginhereusingyourusernameandpassword,Display:Sorry,youhaveexceededtheallowednumberofloginattempts.
Restartyourbrowser.
4RegID=InvalidTryagain=YesRegID=ValidDisplay:Loginhereusingyourusernameandpassword,Display:Invalidlogin,pleasetryagain,Display:Loginhereusingyourusernameandpassword,Launchstudentmainviewpage.
TestResultFourstudentfunctionalitieshavebeenautomaticallygeneratedusingtheproposedtestcasegeneratorprototype.
ThegeneratedtestcasesarecomparedwiththetestcasesmanuallygeneratedbyAlshammari(2010).
Fromthiscomparison,itshowsthatthetestcasesgeneratedTestcasesforeachpathAllpossiblepaths:4pathsarecreatedProceedingsofthe3rdInternationalConferenceonComputingandInformatics,ICOCI2011,8-9June,2011Bandung,IndonesiaPaperNo.
021231bythedevelopedtestcasegeneratorprogramarethesameastheonemanuallyderived.
Therefore,itcanbeconcludedthattheproposedalgorithmisusableandreliable.
FUTUREWORKInthefuture,thisalgorithmcanbegeneralizedsothatitcanaccommodatevarioustestcoveragecriteriawithinthesametestderivationframework.
Thisprototypecanbeimprovedbydevelopingtheabilitytobuilddirectedgraphandparsetestcasesfromit.
TheUMLactivitydiagramsthathavebeenusedinthisresearchwereusingUML1.
0version.
Forthefuturework,theuseofUML2.
0notationisrecommended.
Additionally,theUMLactivitydiagramsweregeneratedmanuallyinthework;therefore,theuseofatoolthatisabletoautomaticallygeneratethesediagramsissuggested.
CONCLUSIONTheuseofactivegraphisagoodmethodtoensurethatthegenerationofthetestcasesautomaticallyusingtheproposedalgorithmanditsimplementation,andusingtheUMLactivitydiagramasabasetoguaranteetheabilityofautomaticimplementation.
Thereusabilityofthisresearchworkcanbeappliedtocompletefullautomaticanalysis.
ThistestwillopennewopportunitytodiscovernewtechniquesormethodsforthetestingusingUMLdiagramsandautomatictestcasesgeneration.
REFERENCESAlshammari,S.
A.
(2010).
GeneratingTestCasesforLearningZone.
Thesis,UUM.
Cartaxo,E.
,Neto,F.
,&Machado,P.
(2007).
TestCaseGenerationbymeansofUMLSequenceDiagramsandLabeledTransitionSystems.
IEEE,1292-1297.
Chen,M.
,Qiu,X.
,Xu,W.
,Wang,L.
,Zhao,J.
,&Li,X.
(2009).
UMLActivityDiagram-BasedAutomaticTestCaseGenerationForJavaPrograms.
TheComputerJournal,52(5),545-556.
Heumann,J.
(2001).
GeneratingTestCasesFromUseCases.
Retrieved5July,2010,from:http://www.
ibm.
com/developerworks/rational/library/content/RationalEdge/jun01/GeneratingTestCasesFromUseCasesJune01.
pdfJaved,A.
,Strooper,P.
,&Watson,G.
(2007).
AutomatedGenerationofTestCasesUsingModel-DrivenArchitecture.
IEEE,3-9.
Kim,H.
,Kang,S.
,Baik,J.
,&Ko,I.
(2007).
TestCasesGenerationfromUMLActivityDiagrams.
IEEE,556-561.
Kundu,D.
,&Samanta,D.
(2009).
ANovelApproachtoGenerateTestCasesfromUMLActivityDiagrams.
JournalofObjectTechnology,8(3),65-83.
Lilly,R.
,&G,U.
(2010).
ReliableMiningofAutomaticallyGeneratedTestCasesfromSoftwareRequirementsSpecification.
InternationalJournalofComputerScienceIssues,87-91.
Linzhang,W.
,Jiesong,Y.
,Xiaofeng,Y.
,Jun,H.
,Xuandong,L.
,&Guoliang,Z.
(2004).
GeneratingTestCasesfromUMLActivityDiagrambasedonGray-BoxMethod.
IEEE,284-291.
Mingsong,C.
,Xiaokang,Q.
,&Xuandong,L.
(2006).
AutomaticTestCaseGenerationforUMLActivityDiagrams.
ACM,2-8.

阿里云金秋上云季,云服务器秒杀2C2G5M年付60元起

阿里云(aliyun)在这个月又推出了一个金秋上云季活动,到9月30日前,每天两场秒杀活动,包括轻量应用服务器、云服务器、云数据库、短信包、存储包、CDN流量包等等产品,其中Aliyun轻量云服务器最低60元/年起,还可以99元续费3次!活动针对新用户和没有购买过他们的产品的老用户均可参与,每人限购1件。关于阿里云不用多说了,国内首屈一指的云服务器商家,无论建站还是学习都是相当靠谱的。活动地址:h...

bgpto:独立服务器夏季促销,日本机器6.5折、新加坡7.5折,20M带宽,低至$93/月

bgp.to对日本机房、新加坡机房的独立服务器在搞特价促销,日本独立服务器低至6.5折优惠,新加坡独立服务器低至7.5折优惠,所有优惠都是循环的,终身不涨价。服务器不限制流量,支持升级带宽,免费支持Linux和Windows server中文版(还包括Windows 10). 特色:自动部署,无需人工干预,用户可以在后台自己重装系统、重启、关机等操作!官方网站:https://www.bgp.to...

HostRound:美国达拉斯/洛杉矶/纽约/荷兰大硬盘服务器,1TB NVMe+4TB HDD,$179/月

hostround怎么样?大硬盘服务器,高防服务器。hostround,美国商家,2017年成立,正规注册公司(Company File #6180543),提供虚拟主机、VPS云主机、美国服务器、荷兰服务器租用等。现在有1款特价大硬盘独服,位于达拉斯,配置还不错,本月订购时包括免费 500Gbps DDoS 保护,有兴趣的可以关注一下。点击直达:hostround官方网站地址美国\荷兰独立服务器...

studentmain为你推荐
linux虚拟主机如何安装LINUX虚拟机独立ip主机有用过独立IP主机吗vpsvps和服务器哪个比较划算国内免费空间国内哪里有免费的空间?台湾主机香港,美国,台湾,韩国,日本主机到底哪个好台湾主机台湾版本的主机好不好?海外域名我想了解一下“国内域名”,“国外域名”以及“海外服务器”这三个方面的一些知识域名申请申请域名需要什么条件?具体点!急!急!!!重庆虚拟主机重庆市邮政速递物流公司渝北分公司双龙揽投部客服电话虚拟主机试用哪儿的虚拟主机可以试用??
org域名 泛域名 com域名抢注 photonvps zpanel softlayer 香港机房托管 外国空间 evssl证书 typecho 国外免费空间 申请空间 毫秒英文 可外链相册 世界测速 傲盾官网 绍兴电信 免费dns解析 超级服务器 免费网络 更多