SlideShare una empresa de Scribd logo
1 de 6
Scale out the test cases
X-BU Partner Integration Engineering
Tao Zhou
Tao.Zhou@emc.com
Abstract:
Thispaperwill introduce asimple waytoscale outtest caseson manymachines.The wayto scale out
testcases will notrequire code changestoexistingtestcodes,whichusing reflectiontechnologyto
decouple the synchronizationcode andtestcasescode.
1. Introduction
For automationtesting,there will havemore thanthousandsof testcases.Inregressionphase, there is
alwayspainto handle tremendouscasesinshorttime:if all testcasesrun sequentiallyinseparated
environments,thatwill takesmore time tocomplete testingthanexpected,butif casesare parallel
running,thatwill require extraeffortto synchronize the critical resource requests betweenthe test
cases. Is there an easywayto scale out these testcasestoparallel executionwithoutresource
confliction?The paperwilldescribehowtoscale outyour testcasesin an easyway.
2. The synchronization architecture
How to synchronize the resource request inautomationtestcases? Forthe testcasesare runningon
differentmachines,soitisintuitional tohave aserver(Figure 1) to synchronize the requests.
Figure 1
The serverside implementationcouldsimple andstraightforward,butthe difficultpartisthe client
code,for the followingreasons:
 The existedtestcasesare designedwithoutconsiderthe parallel executioncases.
 The testingenvironmentmaychange frequently.
 Addingthe synchronize code intestcasesneedsextra effectforQA.
 There will heterogeneoustestcases,forexample,testcase A will require resource 1, 2, 3 in
differentphases,buttestcase B will only requireresource 2inspecified.SowhenA isusing
resource 1 and 3 the case B coulduse resource 2.
Is there a panaceato serve all testcases? Yes,the paperwill introduce the methodwhichwill easily
transferthe single-processtestcasestomulti-processestestcases.
3. Client side software design
As previous sectionmentioned,there are many issues fordesignthe synchronize code forclientside,in
the section,there isa simple scenariotodemonstrate how toresolve theseissues.
The picture (Figure 2) showsthe simplifiedcode whichcontainsatestcase of creatinga Lun. When
several instance of the case runsimultaneously, the storage will getmore thanone requestforcreating
Lun at a moment,then the instances will be failed.
Figure 2
Andthe followingpicture (Figure 3) showsthe synchronizedcode addedtothe testcase,now when
several instances are runningsimultaneously,butonstorage side,the requestforcreating Lunisone by
one,the orderof requestingissynchronizedbyserver, sothese instanceswillbe success.
Figure 3
As showingthe picture above,thereisno extraworkfor testcase code, onlywork is justadd an
attribute tothe New-EmcLunclass. The attribute isadecoupledwithtestcases,andeasilybe
implemented.
So the attribute classperfectlyresolvesall the issuesmentionedinprevioussection, butwhythe
attribute classhasthe magicpower?
The picture below (Figure 4) isa typicallytestcasesstructure,the testcasescall the commandclasses,
and commandclasses finallycall all kindsof CLI viaadapter class to execute the commandintestcases.
Figure 4
What’sthe attribute classdois markthe critical resource forcommandclasses.Whenthe command
classcallsthe adapterclassto execute CLIcommand,thenthe adapterclassqueries the attributesof
commandclass then getthe critical resource ID inrunningtime environmentfromattributevalues,then
queryto servertomake sure the critical resource isnotusingby othertestcases.
Figure 5
The magic powerof the designisthat the critical resource ID isgetfrom runningtime environment,only
thingthe testcases designerneedtoknow isjustsettingthe attribute of commandclass. For the same
commandclass,whenthe environmentisdifferent,there will generate differentcritical environmentID.
Andthe test casescode is decoupled withsynchronization code,there will getsynchronizedtestcases
withoutchange anytestcases code.
4. Server side software design
Serverside software designisstraightforwardandsimple,only one concernisresource deadlock.For
example if clientA requestresource 1and2, meanwhile clientBrequest2 and 3, clientCrequest3 and
1, if resource isassignedseparately,the deadlockscenariowillhappen.The simplewaytoresolve the
issue isto setatomiclockfor each resource request,onlyall requestedresourceare available,the
resource will be acquired.
Figure 6
5. Application
To get more strictlytestingresultof the scale-outabilityof the design.There are choosingthe most
resource consumingcasesandall casesrequestssame resources. There definestwoparametersto
measure the scale-outability:
The over headrate: 𝑅 𝑜ℎ =
𝑇𝑛
𝑇1
; 𝑇𝑛 is whentestcasesrunningonN machines,the sumof time forN
machinescostfor testcases, 𝑇1 is the time withonlyone machine,the time of runningall testcases. The
rate isnear the value 1 meansthe systemisa scalable system.
The response time rate: 𝑅 𝑟𝑒𝑠 =
𝑅𝑒𝑠 𝑛
𝑅𝑒𝑠1
; 𝑅𝑒𝑠 𝑛 isthe average response time of server (the resource [Like
storage,Host] whichtestcasesare using) whentestcasesare runningonN machine, 𝑅𝑒𝑠1 isthe
average response time whentestcasesare runningon1 machine.
Form the picture below,the 𝑅 𝑜ℎ value isnear1 whenN =3 and 2, whichmeansthe overheadisverylow
if testcases are runningon 3 machines; the 𝑅 𝑟𝑒𝑠 turnhighwhenN=4, whichmeanswhen4clientsare
requestingthe service onserver,the serverperformance isdegradedsharply,thatmaycausedby
reachingthe maximumof servercapability.Sothe 𝑅 𝑜ℎ increase onN=4 iscausesby 𝑅 𝑟𝑒𝑠 increasing. So
the scalabilityof the testisdependsonthe servercapability.
Figure 7
6. Summary
Thispaperintroducedaneasyimplementationof synchronization.Withthe implementation,the test
casescouldeasilyscale out on manymachines.
0
0.5
1
1.5
2
2.5
3
1 2 3 4
Roh
Rres
Numof Machine

Más contenido relacionado

La actualidad más candente

PVS-Studio static analyzer: advanced features
PVS-Studio static analyzer: advanced featuresPVS-Studio static analyzer: advanced features
PVS-Studio static analyzer: advanced featuresAndrey Karpov
 
HPX and PVS-Studio
HPX and PVS-StudioHPX and PVS-Studio
HPX and PVS-StudioPVS-Studio
 
Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, March 2013Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, March 2013Hazem Saleh
 
TDD with Visual Studio 2010
TDD with Visual Studio 2010TDD with Visual Studio 2010
TDD with Visual Studio 2010Stefano Paluello
 
A tale of bug prediction in software development
A tale of bug prediction in software developmentA tale of bug prediction in software development
A tale of bug prediction in software developmentMartin Pinzger
 
Qtp interview questions and answers
Qtp interview questions and answersQtp interview questions and answers
Qtp interview questions and answersITeLearn
 
Realtime selenium interview questions
Realtime selenium interview questionsRealtime selenium interview questions
Realtime selenium interview questionsKuldeep Pawar
 
Unit testing on embedded target with C++Test
Unit testing on embedded  target with C++TestUnit testing on embedded  target with C++Test
Unit testing on embedded target with C++TestEngineering Software Lab
 
Legacy Dependency Kata v2.0
Legacy Dependency Kata v2.0Legacy Dependency Kata v2.0
Legacy Dependency Kata v2.0William Munn
 
Legacy Code Kata v3.0
Legacy Code Kata v3.0Legacy Code Kata v3.0
Legacy Code Kata v3.0William Munn
 
Comparing Functionalities of PVS-Studio and CppCat Static Code Analyzers
Comparing Functionalities of PVS-Studio and CppCat Static Code AnalyzersComparing Functionalities of PVS-Studio and CppCat Static Code Analyzers
Comparing Functionalities of PVS-Studio and CppCat Static Code AnalyzersAndrey Karpov
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questionsRamu Palanki
 
Declarative Input Validation with JSR 303 and ExtVal
Declarative Input Validation with JSR 303 and ExtValDeclarative Input Validation with JSR 303 and ExtVal
Declarative Input Validation with JSR 303 and ExtValBart Kummel
 
Embrace Unit Testing
Embrace Unit TestingEmbrace Unit Testing
Embrace Unit Testingalessiopace
 
Dependency Injection або Don’t call me, I’ll call you
Dependency Injection або Don’t call me, I’ll call youDependency Injection або Don’t call me, I’ll call you
Dependency Injection або Don’t call me, I’ll call youDmytro Mindra
 

La actualidad más candente (19)

PVS-Studio static analyzer: advanced features
PVS-Studio static analyzer: advanced featuresPVS-Studio static analyzer: advanced features
PVS-Studio static analyzer: advanced features
 
HPX and PVS-Studio
HPX and PVS-StudioHPX and PVS-Studio
HPX and PVS-Studio
 
Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, March 2013Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, March 2013
 
TDD with Visual Studio 2010
TDD with Visual Studio 2010TDD with Visual Studio 2010
TDD with Visual Studio 2010
 
A tale of bug prediction in software development
A tale of bug prediction in software developmentA tale of bug prediction in software development
A tale of bug prediction in software development
 
Qtp interview questions and answers
Qtp interview questions and answersQtp interview questions and answers
Qtp interview questions and answers
 
Realtime selenium interview questions
Realtime selenium interview questionsRealtime selenium interview questions
Realtime selenium interview questions
 
J2EE-assignment
 J2EE-assignment J2EE-assignment
J2EE-assignment
 
Unit testing on embedded target with C++Test
Unit testing on embedded  target with C++TestUnit testing on embedded  target with C++Test
Unit testing on embedded target with C++Test
 
Legacy Dependency Kata v2.0
Legacy Dependency Kata v2.0Legacy Dependency Kata v2.0
Legacy Dependency Kata v2.0
 
Junit
JunitJunit
Junit
 
Legacy Code Kata v3.0
Legacy Code Kata v3.0Legacy Code Kata v3.0
Legacy Code Kata v3.0
 
Comparing Functionalities of PVS-Studio and CppCat Static Code Analyzers
Comparing Functionalities of PVS-Studio and CppCat Static Code AnalyzersComparing Functionalities of PVS-Studio and CppCat Static Code Analyzers
Comparing Functionalities of PVS-Studio and CppCat Static Code Analyzers
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questions
 
Declarative Input Validation with JSR 303 and ExtVal
Declarative Input Validation with JSR 303 and ExtValDeclarative Input Validation with JSR 303 and ExtVal
Declarative Input Validation with JSR 303 and ExtVal
 
Embrace Unit Testing
Embrace Unit TestingEmbrace Unit Testing
Embrace Unit Testing
 
Hands on: Hystrix
Hands on: HystrixHands on: Hystrix
Hands on: Hystrix
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Dependency Injection або Don’t call me, I’ll call you
Dependency Injection або Don’t call me, I’ll call youDependency Injection або Don’t call me, I’ll call you
Dependency Injection або Don’t call me, I’ll call you
 

Destacado

창의적 발상 Typo
창의적 발상 Typo창의적 발상 Typo
창의적 발상 Typosohwi
 
GSB_CSRD-Ghana article_Nov-07
GSB_CSRD-Ghana article_Nov-07GSB_CSRD-Ghana article_Nov-07
GSB_CSRD-Ghana article_Nov-07Stephen Hicks
 
Identificación peligros y valoración de riesgos en seguridad y salud ocupacional
Identificación peligros y valoración de riesgos en seguridad y salud ocupacionalIdentificación peligros y valoración de riesgos en seguridad y salud ocupacional
Identificación peligros y valoración de riesgos en seguridad y salud ocupacionaljairo steven dubois morales
 
Animaliak unax
Animaliak unaxAnimaliak unax
Animaliak unaxeskolaikt
 
Implantação do BIM na CPTM
Implantação do BIM na CPTMImplantação do BIM na CPTM
Implantação do BIM na CPTMinovaDay .
 
Russian presentation
Russian presentationRussian presentation
Russian presentationbeebemeister
 
10 solutii simple impotriva timiditatii
10 solutii simple impotriva timiditatii10 solutii simple impotriva timiditatii
10 solutii simple impotriva timiditatiiALL.RO
 

Destacado (16)

Lavadora AEG L85275XFL
Lavadora AEG L85275XFLLavadora AEG L85275XFL
Lavadora AEG L85275XFL
 
창의적 발상 Typo
창의적 발상 Typo창의적 발상 Typo
창의적 발상 Typo
 
Rol asistencial
Rol asistencialRol asistencial
Rol asistencial
 
Lavavajillas Siemens SN25M245EU
Lavavajillas Siemens SN25M245EULavavajillas Siemens SN25M245EU
Lavavajillas Siemens SN25M245EU
 
Nevera Bosch KDN30X13
Nevera Bosch KDN30X13Nevera Bosch KDN30X13
Nevera Bosch KDN30X13
 
GSB_CSRD-Ghana article_Nov-07
GSB_CSRD-Ghana article_Nov-07GSB_CSRD-Ghana article_Nov-07
GSB_CSRD-Ghana article_Nov-07
 
Manual slideshare
Manual slideshareManual slideshare
Manual slideshare
 
Horno ZANUSSI ZZU10301WK
Horno ZANUSSI ZZU10301WKHorno ZANUSSI ZZU10301WK
Horno ZANUSSI ZZU10301WK
 
Identificación peligros y valoración de riesgos en seguridad y salud ocupacional
Identificación peligros y valoración de riesgos en seguridad y salud ocupacionalIdentificación peligros y valoración de riesgos en seguridad y salud ocupacional
Identificación peligros y valoración de riesgos en seguridad y salud ocupacional
 
Animaliak unax
Animaliak unaxAnimaliak unax
Animaliak unax
 
Implantação do BIM na CPTM
Implantação do BIM na CPTMImplantação do BIM na CPTM
Implantação do BIM na CPTM
 
NADIA NIH RESUME
NADIA NIH RESUMENADIA NIH RESUME
NADIA NIH RESUME
 
Portugalia
PortugaliaPortugalia
Portugalia
 
Redes sociales
Redes socialesRedes sociales
Redes sociales
 
Russian presentation
Russian presentationRussian presentation
Russian presentation
 
10 solutii simple impotriva timiditatii
10 solutii simple impotriva timiditatii10 solutii simple impotriva timiditatii
10 solutii simple impotriva timiditatii
 

Similar a ScalaOut

Queuing model based load testing of large enterprise applications
Queuing model based load testing of large enterprise applicationsQueuing model based load testing of large enterprise applications
Queuing model based load testing of large enterprise applicationsLeonid Grinshpan, Ph.D.
 
Unit Testing Fundamentals
Unit Testing FundamentalsUnit Testing Fundamentals
Unit Testing FundamentalsRichard Paul
 
Basics of QTP Framework
Basics of QTP FrameworkBasics of QTP Framework
Basics of QTP FrameworkAnish10110
 
Continuous Deployment with Amazon Web Services by Carlos Conde
Continuous Deployment with Amazon Web Services by Carlos Conde Continuous Deployment with Amazon Web Services by Carlos Conde
Continuous Deployment with Amazon Web Services by Carlos Conde Codemotion
 
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Cωνσtantίnoς Giannoulis
 
Coldbox developer training – session 4
Coldbox developer training – session 4Coldbox developer training – session 4
Coldbox developer training – session 4Billie Berzinskas
 
Cloud Native Dünyada CI/CD
Cloud Native Dünyada CI/CDCloud Native Dünyada CI/CD
Cloud Native Dünyada CI/CDMustafa AKIN
 
Phil Basford - machine learning at scale with aws sage maker
Phil Basford - machine learning at scale with aws sage makerPhil Basford - machine learning at scale with aws sage maker
Phil Basford - machine learning at scale with aws sage makerAWSCOMSUM
 
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model ServingKubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model ServingTheofilos Papapanagiotou
 
JLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containersJLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containersGrace Jansen
 
Machine learning at scale with aws sage maker
Machine learning at scale with aws sage makerMachine learning at scale with aws sage maker
Machine learning at scale with aws sage makerPhilipBasford
 
Resilience Testing
Resilience Testing Resilience Testing
Resilience Testing Ran Levy
 
Testing a Service Fabric solution and live happy!!
Testing a Service Fabric solution and live happy!!Testing a Service Fabric solution and live happy!!
Testing a Service Fabric solution and live happy!!Massimo Bonanni
 
Prod-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsProd-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsVMware Tanzu
 
Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례uEngine Solutions
 
JBCN_Testing_With_Containers
JBCN_Testing_With_ContainersJBCN_Testing_With_Containers
JBCN_Testing_With_ContainersGrace Jansen
 
Writing useful automated tests for the single page applications you build
Writing useful automated tests for the single page applications you buildWriting useful automated tests for the single page applications you build
Writing useful automated tests for the single page applications you buildAndrei Sebastian Cîmpean
 
How I Learned to Stop Worrying and Love Legacy Code
How I Learned to Stop Worrying and Love Legacy CodeHow I Learned to Stop Worrying and Love Legacy Code
How I Learned to Stop Worrying and Love Legacy CodeGene Gotimer
 
How to Test Asynchronous Code (v2)
How to Test Asynchronous Code (v2)How to Test Asynchronous Code (v2)
How to Test Asynchronous Code (v2)Felix Geisendörfer
 
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...CA Technologies
 

Similar a ScalaOut (20)

Queuing model based load testing of large enterprise applications
Queuing model based load testing of large enterprise applicationsQueuing model based load testing of large enterprise applications
Queuing model based load testing of large enterprise applications
 
Unit Testing Fundamentals
Unit Testing FundamentalsUnit Testing Fundamentals
Unit Testing Fundamentals
 
Basics of QTP Framework
Basics of QTP FrameworkBasics of QTP Framework
Basics of QTP Framework
 
Continuous Deployment with Amazon Web Services by Carlos Conde
Continuous Deployment with Amazon Web Services by Carlos Conde Continuous Deployment with Amazon Web Services by Carlos Conde
Continuous Deployment with Amazon Web Services by Carlos Conde
 
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
 
Coldbox developer training – session 4
Coldbox developer training – session 4Coldbox developer training – session 4
Coldbox developer training – session 4
 
Cloud Native Dünyada CI/CD
Cloud Native Dünyada CI/CDCloud Native Dünyada CI/CD
Cloud Native Dünyada CI/CD
 
Phil Basford - machine learning at scale with aws sage maker
Phil Basford - machine learning at scale with aws sage makerPhil Basford - machine learning at scale with aws sage maker
Phil Basford - machine learning at scale with aws sage maker
 
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model ServingKubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
 
JLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containersJLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containers
 
Machine learning at scale with aws sage maker
Machine learning at scale with aws sage makerMachine learning at scale with aws sage maker
Machine learning at scale with aws sage maker
 
Resilience Testing
Resilience Testing Resilience Testing
Resilience Testing
 
Testing a Service Fabric solution and live happy!!
Testing a Service Fabric solution and live happy!!Testing a Service Fabric solution and live happy!!
Testing a Service Fabric solution and live happy!!
 
Prod-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsProd-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized Applications
 
Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례
 
JBCN_Testing_With_Containers
JBCN_Testing_With_ContainersJBCN_Testing_With_Containers
JBCN_Testing_With_Containers
 
Writing useful automated tests for the single page applications you build
Writing useful automated tests for the single page applications you buildWriting useful automated tests for the single page applications you build
Writing useful automated tests for the single page applications you build
 
How I Learned to Stop Worrying and Love Legacy Code
How I Learned to Stop Worrying and Love Legacy CodeHow I Learned to Stop Worrying and Love Legacy Code
How I Learned to Stop Worrying and Love Legacy Code
 
How to Test Asynchronous Code (v2)
How to Test Asynchronous Code (v2)How to Test Asynchronous Code (v2)
How to Test Asynchronous Code (v2)
 
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
 

ScalaOut

  • 1. Scale out the test cases X-BU Partner Integration Engineering Tao Zhou Tao.Zhou@emc.com Abstract: Thispaperwill introduce asimple waytoscale outtest caseson manymachines.The wayto scale out testcases will notrequire code changestoexistingtestcodes,whichusing reflectiontechnologyto decouple the synchronizationcode andtestcasescode. 1. Introduction For automationtesting,there will havemore thanthousandsof testcases.Inregressionphase, there is alwayspainto handle tremendouscasesinshorttime:if all testcasesrun sequentiallyinseparated environments,thatwill takesmore time tocomplete testingthanexpected,butif casesare parallel running,thatwill require extraeffortto synchronize the critical resource requests betweenthe test cases. Is there an easywayto scale out these testcasestoparallel executionwithoutresource confliction?The paperwilldescribehowtoscale outyour testcasesin an easyway. 2. The synchronization architecture How to synchronize the resource request inautomationtestcases? Forthe testcasesare runningon differentmachines,soitisintuitional tohave aserver(Figure 1) to synchronize the requests. Figure 1
  • 2. The serverside implementationcouldsimple andstraightforward,butthe difficultpartisthe client code,for the followingreasons:  The existedtestcasesare designedwithoutconsiderthe parallel executioncases.  The testingenvironmentmaychange frequently.  Addingthe synchronize code intestcasesneedsextra effectforQA.  There will heterogeneoustestcases,forexample,testcase A will require resource 1, 2, 3 in differentphases,buttestcase B will only requireresource 2inspecified.SowhenA isusing resource 1 and 3 the case B coulduse resource 2. Is there a panaceato serve all testcases? Yes,the paperwill introduce the methodwhichwill easily transferthe single-processtestcasestomulti-processestestcases. 3. Client side software design As previous sectionmentioned,there are many issues fordesignthe synchronize code forclientside,in the section,there isa simple scenariotodemonstrate how toresolve theseissues. The picture (Figure 2) showsthe simplifiedcode whichcontainsatestcase of creatinga Lun. When several instance of the case runsimultaneously, the storage will getmore thanone requestforcreating Lun at a moment,then the instances will be failed. Figure 2 Andthe followingpicture (Figure 3) showsthe synchronizedcode addedtothe testcase,now when several instances are runningsimultaneously,butonstorage side,the requestforcreating Lunisone by one,the orderof requestingissynchronizedbyserver, sothese instanceswillbe success.
  • 3. Figure 3 As showingthe picture above,thereisno extraworkfor testcase code, onlywork is justadd an attribute tothe New-EmcLunclass. The attribute isadecoupledwithtestcases,andeasilybe implemented. So the attribute classperfectlyresolvesall the issuesmentionedinprevioussection, butwhythe attribute classhasthe magicpower? The picture below (Figure 4) isa typicallytestcasesstructure,the testcasescall the commandclasses, and commandclasses finallycall all kindsof CLI viaadapter class to execute the commandintestcases. Figure 4 What’sthe attribute classdois markthe critical resource forcommandclasses.Whenthe command classcallsthe adapterclassto execute CLIcommand,thenthe adapterclassqueries the attributesof
  • 4. commandclass then getthe critical resource ID inrunningtime environmentfromattributevalues,then queryto servertomake sure the critical resource isnotusingby othertestcases. Figure 5 The magic powerof the designisthat the critical resource ID isgetfrom runningtime environment,only thingthe testcases designerneedtoknow isjustsettingthe attribute of commandclass. For the same commandclass,whenthe environmentisdifferent,there will generate differentcritical environmentID. Andthe test casescode is decoupled withsynchronization code,there will getsynchronizedtestcases withoutchange anytestcases code. 4. Server side software design Serverside software designisstraightforwardandsimple,only one concernisresource deadlock.For example if clientA requestresource 1and2, meanwhile clientBrequest2 and 3, clientCrequest3 and 1, if resource isassignedseparately,the deadlockscenariowillhappen.The simplewaytoresolve the issue isto setatomiclockfor each resource request,onlyall requestedresourceare available,the resource will be acquired.
  • 5. Figure 6 5. Application To get more strictlytestingresultof the scale-outabilityof the design.There are choosingthe most resource consumingcasesandall casesrequestssame resources. There definestwoparametersto measure the scale-outability: The over headrate: 𝑅 𝑜ℎ = 𝑇𝑛 𝑇1 ; 𝑇𝑛 is whentestcasesrunningonN machines,the sumof time forN machinescostfor testcases, 𝑇1 is the time withonlyone machine,the time of runningall testcases. The rate isnear the value 1 meansthe systemisa scalable system. The response time rate: 𝑅 𝑟𝑒𝑠 = 𝑅𝑒𝑠 𝑛 𝑅𝑒𝑠1 ; 𝑅𝑒𝑠 𝑛 isthe average response time of server (the resource [Like storage,Host] whichtestcasesare using) whentestcasesare runningonN machine, 𝑅𝑒𝑠1 isthe average response time whentestcasesare runningon1 machine. Form the picture below,the 𝑅 𝑜ℎ value isnear1 whenN =3 and 2, whichmeansthe overheadisverylow if testcases are runningon 3 machines; the 𝑅 𝑟𝑒𝑠 turnhighwhenN=4, whichmeanswhen4clientsare requestingthe service onserver,the serverperformance isdegradedsharply,thatmaycausedby reachingthe maximumof servercapability.Sothe 𝑅 𝑜ℎ increase onN=4 iscausesby 𝑅 𝑟𝑒𝑠 increasing. So the scalabilityof the testisdependsonthe servercapability.
  • 6. Figure 7 6. Summary Thispaperintroducedaneasyimplementationof synchronization.Withthe implementation,the test casescouldeasilyscale out on manymachines. 0 0.5 1 1.5 2 2.5 3 1 2 3 4 Roh Rres Numof Machine