SlideShare a Scribd company logo
HTTP://TESTINGTOOLSTECNIQUES.BLOGSPOT.COM/
FAHAD SHEIKH 0
0
LOAD TESTING WITH VISUAL
STUDIO
Fahad Sheikh
fsheikh@lmkt.com
http://testingtoolstecniques.blogspot.com/
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
Table of Contents
Chapter 1: Introduction.......................................................................................................................2
Load testing introduction ................................................................................................................2
Difference Betweenload and performance test................................................................................3
Performance testing:.................................................................................................................3
Load Testing:..............................................................................................................................3
Process of Creating load Test in Visual Studio...................................................................................3
Guidelines for a Good load test........................................................................................................4
Resources required for load testing With VSTS. ................................................................................4
Chapter 2: Creating Web Application Performance Test........................................................................4
Creating a Load Test Project ............................................................................................................5
Creating a Performance Test Using Recorder....................................................................................6
Parameterize recorded script...........................................................................................................8
Chapter 3: Load Testing Soap Web service.........................................................................................11
Creating a Load Test Project ..........................................................................................................11
Creating a Performance Test Using Recorder..................................................................................12
Parameterize script.......................................................................................................................14
Chapter 3: Creating Load test against Performance test......................................................................16
Add load test................................................................................................................................16
Executingload test........................................................................................................................20
Generating Report........................................................................................................................21
http://testingtoolstecniques.blogspot.com/
Chapter 1: Introduction
Load testing introduction
Load testingisthe processof puttingdemandona systemor device andmeasuringitsresponse.Load
testingisperformedtodetermine asystem’sbehaviorunderbothnormal andanticipatedpeakload
conditions.Ithelpstoidentifythe maximumoperatingcapacityof anapplicationaswell asany
bottlenecksanddeterminewhichelementiscausingdegradation.Whenthe loadplacedonthe system
israisedbeyondnormal usage patterns,inordertotestthe system'sresponse atunusuallyhighorpeak
loads,itis knownas stresstesting.The loadisusuallysogreatthat error conditionsare the expected
result,althoughnoclearboundaryexistswhenanactivityceasestobe aloadtest andbecomesa stress
test.
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
Difference Between load and performance test
Performance testing:
“In the computerindustry,software performance testingisusedtodetermine the speedor
effectivenessof acomputer,network,software programordevice.Thisprocesscaninvolve quantitative
testsdone ina lab, suchas measuringthe response time orthe numberof MIPS(millionsof instructions
persecond) at whicha systemfunctions.Qualitative attributessuchasreliability,scalabilityand
interoperabilitymayalsobe evaluated.Performance testingisoftendone inconjunctionwithstress
testing.”
Load Testing:
Load testingismeantto testthe systembyconstantlyandsteadilyincreasingthe loadonthe systemtill
the time itreachesthe thresholdlimit.Itisthe simplestformof testingwhichemploysthe use of
automationtoolssuchas Visual Studiooranyothergood tools,whichare available.Loadtestingisalso
famousbythe nameslike.
Difference:
Load Testing Performance Testing
Load testingismeantto testthe systemby
constantlyandsteadilyincreasingthe loadonthe
systemtill the time itreachesthe thresholdlimit
Performance testingismeasuringquality
characteristicsof an applicationlike‘Response
Time’,‘Processorutilization‘etc
It Is usedtodetermine what’sthe peaklimitof
requestunderwhichourapplicationcanwork
fine
Performance testingisused todetermine
performance characteristicse.g.what’sthe
response of a certainfunctionality.
The goals of loadtestingare to expose the
defectsinapplicationrelatedtobufferoverflow,
memoryleaksandmismanagementof memory
The primarygoal of performance testingincludes
establishingthe benchmarkbehaviorof
the system.There are a numberof industry-
definedbenchmarks,whichshouldbe metduring
performance testing.
How it’s used:
NormallyPerformanceTestandLoad testare performedtogetherbecause whenugenerate ahigh
volume loadonthe otherhand u have to measure responsetime processorutilizationandotherquality
characteristics
Process of Creating load Test in Visual Studio
These Diagramwill explainabasicloadtestcreation invisual studio.
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
Guidelines for a Good load test.
Load testshouldsimulate crateristicsof areal useras close aspossible e.g.onsigninwhatcan userdo
he can provide validorinvalidbothtype of credentials.
Load Testmust be provideda meaningfull data.
TestData mustbe createdafter analyzingthe processandall possibletype of datathat can be usedina
certainfunctionalitymustbe incorporatedsothatdifferenttypesof behaviorscanbe simulated
Resources required for load testing With VSTS.
Resourcesrequiredforaloadtestwithvisual studioare
Software Requirements:
Visual StudioUltimate
SQL Server
MicrosoftExcel
Hardware Requirements:
It dependsonloadtest
Chapter 2: Creating Web Application Performance Test
In thischapterwe will explainhowtocreate a Load testfor a Web Application.Aswe know aweb
applicationworksonHTTP requests,basicallyload testisdone againstthese HTTPrequestsitdoesn’t
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
clickany GUI elementsortypesinfielde.gwhenyouregisteronapplicationitcallssome GET POST
methodrecorderrecordsthisGET POSTmethodinsteadof recordingin whichelementsusertypedorhe
clicked.
Creating a Load Test Project
Firststepof creatinga loadtest Project.To-doso performfollowingsteps
Steps:
1. OpenVisual StudioInstance
2. Create a NewProjectByclickingNew > Project….
3. Click“Test”and thenselect“WebPerformance and LoadTest Project”withC#,Provide any
Suitable name andclick“OK”.
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
4. AfterCreatingProject
Creating a Performance Test Using Recorder
SecondStepisto create a performance testitcanbe createdusinga recorderor directlycallingHTTP
requestshere we will recordHTTPrequestsusingrecorder.
Steps:
1. To Adda Performance TestLeftClickyourprojectandopenAdd> Web Performance Test.
Note:A Web Testwill be automaticallyaddedandyoucanalsorename that if desired
2. Nowto Start RecorderClickRecordiconOn Visual StudioItwill startrecorderinIE.
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
3. PerformyouStepsandrecorderwill automaticallyrecordHTTPRequest
Here I am Performing
Open login.live.com/
Provide IdandPassword(Note:here Iam usingdummycredentials)
ClickSignin
U will see some HTTPrequestsrecordedonleftsideof screen
AfterRecordingClickSTOP.
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
4. Wait forsome time Visual Studiowill be detectingsome dynamicparametersautomaticallye.g
SessionID
GeneratedScriptwill looklike the below screenshot
Parameterize recorded script
As we knowinloadTest will simulate multiple Userstherefore insome casesall userneedaunique data
settherefore it’sveryimportanttoParameterize load.Tothisfollowingstepsare requiredtobe done
1. IdentifyFields/Parameterse.g.insignin twoparametersmustbe dynamicIDand Password.
2. ExpandYour Requestwhichishavingparameters.
As youcan see PasswordandID, These twoParametersare neededtobe dynamic
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
3. We require adata source to bindour parameterwithadata in Excel or SQL ServerTable.Todo
thisCreate a data source by clickhighlightedIcon.
4. If you wantto fetchdata for parametersfroma CSV file selectCSelse selectDatabase.
In case of SQL Servercreate a connectionwithD.Bbyperformingrequiredstepsandatlast
selectingtable.
5. Afteraddingdatasource viewwill be like this.
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
6. LeftClick Parameterand expandlistandthenselectfieldof table indatasource here Iam
selectingfromCSV
Expanddata source
Expand Table/CSV
SelectField
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
Nowparametervalue will looklike this
7. Save your test
Chapter 3: Load Testing Soap Web service
In thischapterwe will explainhowtocreate a Load testfor a Web Service.Aswe know aAndroid,Web
and differenttype of applicationare builtonSOAPWebservices , basicallyloadtestisdone against
these SOAPWebservices requests.
Creating a Load Test Project
Firststepof creatinga loadtestProject.To-doso performfollowingsteps
Steps:
5. OpenVisual StudioInstance
6. Create a NewProjectByclickingNew > Project….
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
7. Click“Test”and thenselect“WebPerformance andLoadTest Project”withC#,Provide any
Suitable name andclick“OK”.
8. AfterCreatingProject
Creating a Performance Test Using Recorder
SecondStepisto create a performance testitcanbe createdusinga recorderor directlycallingHTTP
requestshere we will recordHTTP requestsusingrecorder.
Steps:
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
1. To Adda Performance TestLeftClickyourprojectandopenAdd> Web Performance Test.
Note:A Web Testwill be automaticallyaddedandyoucanalsorename that if desired
2. If recorderopensclose itotherwise simplyleft clickyourtestandclick“Add WebService
Request” .
3. Change local hostpost methodtouserWeb service addressfrompropertiesatleftpane
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
4. In BodyPropertiesSelectContentType asText/XMLand in StringBodyprovide yourXML .
E.g. Please note use SOAP1.2Requestaswe are using.netframe work4.0 or 4.5
Clickok
Parameterize script
As we knowinloadTest will simulate multiple Userstherefore insome casesall userneedaunique data
settherefore it’sveryimportantto Parameterize Request. Tothisfollowingstepsare requiredtobe
done
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
1. We require adata source to bindour parameterwithadata in Excel or SQL ServerTable.Todo
thisCreate a data source by clickhighlightedIcon.
2. If you wantto fetchdata for parametersfroma CSV file selectCSelse selectDatabase.
In case of SQL Servercreate a connectionwithD.Bbyperformingrequiredstepsandatlast
selectingtable.
3. Nowopenthe webservice bodyXML andfor parameterizingaparametertype initstag
{{DataSource.Name of CSVfile .FieldName}} e.g. {{DataSource1.test#csv.ID}}
Thisway parameterize all requiredparametersof webservice.
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
Chapter 3: Creating Load test against Performance test
Add load test
Nowaftercreatinga performance testyouneedtocreate a loadtestagainstit.To do so perform
followingsteps.
Steps:
1. Leftclickprojectand open
2. A windowwill openclicknext
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
Name yourscenario, SelectThinktime andclickNext
SelectUserscountas per yourrequirementandtestmachine specifications.
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
SelectTestModel
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
Addyour Performance TestByclicking addwhichwouldbe includedinLoadtest
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
SelectYourtest
In thiswayconfigure yourloadtestand continue
Executing load test.
AfterDoingAll configurationssimplystartLoadtest
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
Whenloadtestwill startfollowinggraphswillbe shown
Generating Reporti
There are differentwaysof generatingaloadtestreport one isto automaticallycreatingreport using
excel andsecondone ispreparingreportyourself-havingonlyrequireddatawhatI normallyrequire is
response time anditsgraphsI simplymake reportlike the one mentionedbelowinemail formbutit
dependsonneed.
Fahad Shaikh
http://testingtoolstecniques.blogspot.com/
References:
http://testingtoolstecniques.blogspot.com/
i You can followmy posts on http://testingtoolstecniques.blogspot.com/

More Related Content

What's hot (20)

PPT
Load testing using_neoload by kc
krishna chaitanya
 
PPTX
Coldbox developer training – session 4
Billie Berzinskas
 
PPTX
2014 Joker - Integration Testing from the Trenches
Nicolas Fränkel
 
PPTX
Exactpro Systems for KSTU Students in Kostroma
Iosif Itkin
 
PPTX
Introduction to Performance Testing & Loadrunner
Aisha Mazhar
 
PPT
Neoload overview
Amrita Bisht
 
PPT
Loadrunner presentation
medsherb
 
PPTX
Jbehave selenium
Vadim Goncharenko
 
PDF
Arquillian & Citrus
christophd
 
PDF
Web testing
Maveryx
 
PPTX
Oracle appsloadtestbestpractices
sonusaini69
 
PPTX
Qa process
Aila Bogasieru
 
PDF
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
KMS Technology
 
PDF
Exploring No Mans Land with Keyword-Driven Testing
MartinGijsen
 
PPTX
Performance Testing using LoadRunner
Kumar Gupta
 
PPTX
Continuous Testing in the Agile Age
BlazeMeter
 
PPTX
201502 - Integration Testing
lyonjug
 
PPTX
Using Automation to Meet Demands for Performance and Quality
Neotys
 
PDF
Neoload
Kumar Gupta
 
DOCX
Keyword driven testing in qtp
TrainigHubin India
 
Load testing using_neoload by kc
krishna chaitanya
 
Coldbox developer training – session 4
Billie Berzinskas
 
2014 Joker - Integration Testing from the Trenches
Nicolas Fränkel
 
Exactpro Systems for KSTU Students in Kostroma
Iosif Itkin
 
Introduction to Performance Testing & Loadrunner
Aisha Mazhar
 
Neoload overview
Amrita Bisht
 
Loadrunner presentation
medsherb
 
Jbehave selenium
Vadim Goncharenko
 
Arquillian & Citrus
christophd
 
Web testing
Maveryx
 
Oracle appsloadtestbestpractices
sonusaini69
 
Qa process
Aila Bogasieru
 
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
KMS Technology
 
Exploring No Mans Land with Keyword-Driven Testing
MartinGijsen
 
Performance Testing using LoadRunner
Kumar Gupta
 
Continuous Testing in the Agile Age
BlazeMeter
 
201502 - Integration Testing
lyonjug
 
Using Automation to Meet Demands for Performance and Quality
Neotys
 
Neoload
Kumar Gupta
 
Keyword driven testing in qtp
TrainigHubin India
 

Similar to Load testing with vs 2013 (20)

PDF
Combined Project
Christopher Sveda
 
ODP
WebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
mguillem
 
PPT
Performance testing and j meter
Purna Chandar
 
PDF
Bp ttutorial
Pragya Rastogi
 
PPT
Less12 3 e_loadmodule_2
Suresh Mishra
 
PPTX
Load Runner
Shama Ahsan
 
PPT
JMeter & ColdFusion
isummation
 
PDF
Let's make this test suite run faster! SoftShake 2010
David Gageot
 
PPTX
performancetestingjmeter-121109061704-phpapp02
Gopi Raghavendra
 
PPTX
performancetestingjmeter-121109061704-phpapp02 (1)
QA Programmer
 
PDF
appserver.io tutorial
appserver.io
 
PPTX
Php[tek] 2016 - BDD with Behat for Beginners
Adam Englander
 
PDF
Qtp tutorial
Olga Palade
 
PDF
Codeception introduction and use in Yii
IlPeach
 
PPT
loadrunner
Anand Dhana
 
DOC
Qtp complete guide for all
Ramu Palanki
 
DOC
Qtp basics
Ramu Palanki
 
PPT
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
chrisb206 chrisb206
 
PDF
Acceptance testing in php with Codeception - Techmeetup Edinburgh
Engineor
 
PDF
Learning selenium sample
Minnu Jayaprakash
 
Combined Project
Christopher Sveda
 
WebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
mguillem
 
Performance testing and j meter
Purna Chandar
 
Bp ttutorial
Pragya Rastogi
 
Less12 3 e_loadmodule_2
Suresh Mishra
 
Load Runner
Shama Ahsan
 
JMeter & ColdFusion
isummation
 
Let's make this test suite run faster! SoftShake 2010
David Gageot
 
performancetestingjmeter-121109061704-phpapp02
Gopi Raghavendra
 
performancetestingjmeter-121109061704-phpapp02 (1)
QA Programmer
 
appserver.io tutorial
appserver.io
 
Php[tek] 2016 - BDD with Behat for Beginners
Adam Englander
 
Qtp tutorial
Olga Palade
 
Codeception introduction and use in Yii
IlPeach
 
loadrunner
Anand Dhana
 
Qtp complete guide for all
Ramu Palanki
 
Qtp basics
Ramu Palanki
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
chrisb206 chrisb206
 
Acceptance testing in php with Codeception - Techmeetup Edinburgh
Engineor
 
Learning selenium sample
Minnu Jayaprakash
 
Ad

Recently uploaded (20)

PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PPTX
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
IObit Driver Booster Pro 12.4.0.585 Crack Free Download
henryc1122g
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
IObit Driver Booster Pro 12.4.0.585 Crack Free Download
henryc1122g
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Ad

Load testing with vs 2013

  • 1. HTTP://TESTINGTOOLSTECNIQUES.BLOGSPOT.COM/ FAHAD SHEIKH 0 0 LOAD TESTING WITH VISUAL STUDIO Fahad Sheikh [email protected] http://testingtoolstecniques.blogspot.com/
  • 3. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ Table of Contents Chapter 1: Introduction.......................................................................................................................2 Load testing introduction ................................................................................................................2 Difference Betweenload and performance test................................................................................3 Performance testing:.................................................................................................................3 Load Testing:..............................................................................................................................3 Process of Creating load Test in Visual Studio...................................................................................3 Guidelines for a Good load test........................................................................................................4 Resources required for load testing With VSTS. ................................................................................4 Chapter 2: Creating Web Application Performance Test........................................................................4 Creating a Load Test Project ............................................................................................................5 Creating a Performance Test Using Recorder....................................................................................6 Parameterize recorded script...........................................................................................................8 Chapter 3: Load Testing Soap Web service.........................................................................................11 Creating a Load Test Project ..........................................................................................................11 Creating a Performance Test Using Recorder..................................................................................12 Parameterize script.......................................................................................................................14 Chapter 3: Creating Load test against Performance test......................................................................16 Add load test................................................................................................................................16 Executingload test........................................................................................................................20 Generating Report........................................................................................................................21 http://testingtoolstecniques.blogspot.com/ Chapter 1: Introduction Load testing introduction Load testingisthe processof puttingdemandona systemor device andmeasuringitsresponse.Load testingisperformedtodetermine asystem’sbehaviorunderbothnormal andanticipatedpeakload conditions.Ithelpstoidentifythe maximumoperatingcapacityof anapplicationaswell asany bottlenecksanddeterminewhichelementiscausingdegradation.Whenthe loadplacedonthe system israisedbeyondnormal usage patterns,inordertotestthe system'sresponse atunusuallyhighorpeak loads,itis knownas stresstesting.The loadisusuallysogreatthat error conditionsare the expected result,althoughnoclearboundaryexistswhenanactivityceasestobe aloadtest andbecomesa stress test.
  • 4. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ Difference Between load and performance test Performance testing: “In the computerindustry,software performance testingisusedtodetermine the speedor effectivenessof acomputer,network,software programordevice.Thisprocesscaninvolve quantitative testsdone ina lab, suchas measuringthe response time orthe numberof MIPS(millionsof instructions persecond) at whicha systemfunctions.Qualitative attributessuchasreliability,scalabilityand interoperabilitymayalsobe evaluated.Performance testingisoftendone inconjunctionwithstress testing.” Load Testing: Load testingismeantto testthe systembyconstantlyandsteadilyincreasingthe loadonthe systemtill the time itreachesthe thresholdlimit.Itisthe simplestformof testingwhichemploysthe use of automationtoolssuchas Visual Studiooranyothergood tools,whichare available.Loadtestingisalso famousbythe nameslike. Difference: Load Testing Performance Testing Load testingismeantto testthe systemby constantlyandsteadilyincreasingthe loadonthe systemtill the time itreachesthe thresholdlimit Performance testingismeasuringquality characteristicsof an applicationlike‘Response Time’,‘Processorutilization‘etc It Is usedtodetermine what’sthe peaklimitof requestunderwhichourapplicationcanwork fine Performance testingisused todetermine performance characteristicse.g.what’sthe response of a certainfunctionality. The goals of loadtestingare to expose the defectsinapplicationrelatedtobufferoverflow, memoryleaksandmismanagementof memory The primarygoal of performance testingincludes establishingthe benchmarkbehaviorof the system.There are a numberof industry- definedbenchmarks,whichshouldbe metduring performance testing. How it’s used: NormallyPerformanceTestandLoad testare performedtogetherbecause whenugenerate ahigh volume loadonthe otherhand u have to measure responsetime processorutilizationandotherquality characteristics Process of Creating load Test in Visual Studio These Diagramwill explainabasicloadtestcreation invisual studio.
  • 5. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ Guidelines for a Good load test. Load testshouldsimulate crateristicsof areal useras close aspossible e.g.onsigninwhatcan userdo he can provide validorinvalidbothtype of credentials. Load Testmust be provideda meaningfull data. TestData mustbe createdafter analyzingthe processandall possibletype of datathat can be usedina certainfunctionalitymustbe incorporatedsothatdifferenttypesof behaviorscanbe simulated Resources required for load testing With VSTS. Resourcesrequiredforaloadtestwithvisual studioare Software Requirements: Visual StudioUltimate SQL Server MicrosoftExcel Hardware Requirements: It dependsonloadtest Chapter 2: Creating Web Application Performance Test In thischapterwe will explainhowtocreate a Load testfor a Web Application.Aswe know aweb applicationworksonHTTP requests,basicallyload testisdone againstthese HTTPrequestsitdoesn’t
  • 6. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ clickany GUI elementsortypesinfielde.gwhenyouregisteronapplicationitcallssome GET POST methodrecorderrecordsthisGET POSTmethodinsteadof recordingin whichelementsusertypedorhe clicked. Creating a Load Test Project Firststepof creatinga loadtest Project.To-doso performfollowingsteps Steps: 1. OpenVisual StudioInstance 2. Create a NewProjectByclickingNew > Project…. 3. Click“Test”and thenselect“WebPerformance and LoadTest Project”withC#,Provide any Suitable name andclick“OK”.
  • 7. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ 4. AfterCreatingProject Creating a Performance Test Using Recorder SecondStepisto create a performance testitcanbe createdusinga recorderor directlycallingHTTP requestshere we will recordHTTPrequestsusingrecorder. Steps: 1. To Adda Performance TestLeftClickyourprojectandopenAdd> Web Performance Test. Note:A Web Testwill be automaticallyaddedandyoucanalsorename that if desired 2. Nowto Start RecorderClickRecordiconOn Visual StudioItwill startrecorderinIE.
  • 8. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ 3. PerformyouStepsandrecorderwill automaticallyrecordHTTPRequest Here I am Performing Open login.live.com/ Provide IdandPassword(Note:here Iam usingdummycredentials) ClickSignin U will see some HTTPrequestsrecordedonleftsideof screen AfterRecordingClickSTOP.
  • 9. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ 4. Wait forsome time Visual Studiowill be detectingsome dynamicparametersautomaticallye.g SessionID GeneratedScriptwill looklike the below screenshot Parameterize recorded script As we knowinloadTest will simulate multiple Userstherefore insome casesall userneedaunique data settherefore it’sveryimportanttoParameterize load.Tothisfollowingstepsare requiredtobe done 1. IdentifyFields/Parameterse.g.insignin twoparametersmustbe dynamicIDand Password. 2. ExpandYour Requestwhichishavingparameters. As youcan see PasswordandID, These twoParametersare neededtobe dynamic
  • 10. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ 3. We require adata source to bindour parameterwithadata in Excel or SQL ServerTable.Todo thisCreate a data source by clickhighlightedIcon. 4. If you wantto fetchdata for parametersfroma CSV file selectCSelse selectDatabase. In case of SQL Servercreate a connectionwithD.Bbyperformingrequiredstepsandatlast selectingtable. 5. Afteraddingdatasource viewwill be like this.
  • 11. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ 6. LeftClick Parameterand expandlistandthenselectfieldof table indatasource here Iam selectingfromCSV Expanddata source Expand Table/CSV SelectField
  • 12. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ Nowparametervalue will looklike this 7. Save your test Chapter 3: Load Testing Soap Web service In thischapterwe will explainhowtocreate a Load testfor a Web Service.Aswe know aAndroid,Web and differenttype of applicationare builtonSOAPWebservices , basicallyloadtestisdone against these SOAPWebservices requests. Creating a Load Test Project Firststepof creatinga loadtestProject.To-doso performfollowingsteps Steps: 5. OpenVisual StudioInstance 6. Create a NewProjectByclickingNew > Project….
  • 13. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ 7. Click“Test”and thenselect“WebPerformance andLoadTest Project”withC#,Provide any Suitable name andclick“OK”. 8. AfterCreatingProject Creating a Performance Test Using Recorder SecondStepisto create a performance testitcanbe createdusinga recorderor directlycallingHTTP requestshere we will recordHTTP requestsusingrecorder. Steps:
  • 14. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ 1. To Adda Performance TestLeftClickyourprojectandopenAdd> Web Performance Test. Note:A Web Testwill be automaticallyaddedandyoucanalsorename that if desired 2. If recorderopensclose itotherwise simplyleft clickyourtestandclick“Add WebService Request” . 3. Change local hostpost methodtouserWeb service addressfrompropertiesatleftpane
  • 15. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ 4. In BodyPropertiesSelectContentType asText/XMLand in StringBodyprovide yourXML . E.g. Please note use SOAP1.2Requestaswe are using.netframe work4.0 or 4.5 Clickok Parameterize script As we knowinloadTest will simulate multiple Userstherefore insome casesall userneedaunique data settherefore it’sveryimportantto Parameterize Request. Tothisfollowingstepsare requiredtobe done
  • 16. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ 1. We require adata source to bindour parameterwithadata in Excel or SQL ServerTable.Todo thisCreate a data source by clickhighlightedIcon. 2. If you wantto fetchdata for parametersfroma CSV file selectCSelse selectDatabase. In case of SQL Servercreate a connectionwithD.Bbyperformingrequiredstepsandatlast selectingtable. 3. Nowopenthe webservice bodyXML andfor parameterizingaparametertype initstag {{DataSource.Name of CSVfile .FieldName}} e.g. {{DataSource1.test#csv.ID}} Thisway parameterize all requiredparametersof webservice.
  • 17. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ Chapter 3: Creating Load test against Performance test Add load test Nowaftercreatinga performance testyouneedtocreate a loadtestagainstit.To do so perform followingsteps. Steps: 1. Leftclickprojectand open 2. A windowwill openclicknext
  • 18. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ Name yourscenario, SelectThinktime andclickNext SelectUserscountas per yourrequirementandtestmachine specifications.
  • 21. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ SelectYourtest In thiswayconfigure yourloadtestand continue Executing load test. AfterDoingAll configurationssimplystartLoadtest
  • 22. Fahad Shaikh http://testingtoolstecniques.blogspot.com/ Whenloadtestwill startfollowinggraphswillbe shown Generating Reporti There are differentwaysof generatingaloadtestreport one isto automaticallycreatingreport using excel andsecondone ispreparingreportyourself-havingonlyrequireddatawhatI normallyrequire is response time anditsgraphsI simplymake reportlike the one mentionedbelowinemail formbutit dependsonneed.