Тестирование производительности Ajax приложений с помощью JMeter
Upcoming SlideShare
Loading in...5
×
 

Тестирование производительности Ajax приложений с помощью JMeter

on

  • 3,486 views

Тестирование производительности Ajax приложений с помощью JMeter, Владимир Примаков ...

Тестирование производительности Ajax приложений с помощью JMeter, Владимир Примаков
В этом докладе будет раскрыт вопрос автоматизации тестирования производительности Ajax приложений с помощью бесплатного инструмента jmeter. Я расскажу об основных особенностях и трудностях автоматизации производительности Ajax приложений, о том, с какими конкретно проблемами я сталкивался и как они решались. Также я приведу ряд полезных советов, которые, возможно, облегчат вашу жизнь, если Вы вдруг решитесь провести тестирование производительности ajax приложений.

Statistics

Views

Total Views
3,486
Views on SlideShare
1,690
Embed Views
1,796

Actions

Likes
0
Downloads
10
Comments
0

4 Embeds 1,796

http://atdays.com 1580
http://automated-testing.info 202
https://twitter.com 12
http://translate.googleusercontent.com 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Тестирование производительности Ajax приложений с помощью JMeter Тестирование производительности Ajax приложений с помощью JMeter Presentation Transcript

  • Performance Testing AJAX Application with JMeter Vladimir Primakovatdays.com
  • Agenda AJAX Main Difficulties of Performance Testing of AJAX applications with jmeter and their Solutions Conclusions Questionsatdays.com #atdays 2
  • Me QA Manager at Kuadriga company. 3 years of continuous experience in automated testing: IBM Rational Robot, Test Complete, Selenium (RC), Jmeter. Successfully applied server-side performance and load testing on 4-5 different projects. Enjoy photography, sports, and self-improvement Profile in Linkedin: http://www.linkedin.com/in/vladimirprimakov Email: v.v.primakov@gmail.com Skype: vladimir.primakovatdays.com #atdays 3
  • AJAX – XMLHttpRequest + DHTML (HTML, CSS, Javascript) AJAX - ASYNCHRONOUS JAVASCRIPT AND XMLatdays.com #atdays 4
  • Classic and Ajax Web-appsatdays.com #atdays 5
  • Classic and Ajax Web-apps Classic Browser Client Server Side Web-server Data store, GUI backend processingatdays.com #atdays 6
  • Classic and Ajax Web-apps Classic Browser Client Server Side Http Request Web-server Data store, http(s) transport backend GUI processingatdays.com #atdays 7
  • Classic and Ajax Web-apps Classic Browser Client Server Side Http Request Web-server Data store, http(s) transport backend GUI Http Response processing HTML + javascript + CSS dataatdays.com #atdays 8
  • Classic and Ajax Web-apps Classic Browser Client Server Side Http Request Web-server Data store, http(s) transport backend GUI Http Response processing HTML + javascript + CSS data AJAX Browser Client Server Side Web/ Data store, XML/ backend GUI JSON processing serveratdays.com #atdays 9
  • Classic and Ajax Web-apps Classic Browser Client Server Side Http Request Web-server Data store, http(s) transport backend GUI Http Response processing HTML + javascript + CSS data AJAX Browser Client Server Side JavaScript Web/ Data store, call XML/ Ajax backend GUI JSON Engine processing serveratdays.com #atdays 10
  • Classic and Ajax Web-apps Classic Browser Client Server Side Http Request Web-server Data store, http(s) transport backend GUI Http Response processing HTML + javascript + CSS data AJAX Browser Client Server Side JavaScript Web/ Data store, call XML/ Ajax backend GUI JSON Engine processing XMLHttp Request server objectatdays.com #atdays 11
  • Classic and Ajax Web-apps Classic Browser Client Server Side Http Request Web-server Data store, http(s) transport backend GUI Http Response processing HTML + javascript + CSS data AJAX Browser Client Server Side JavaScript (XML)Http Request Web/ call Data store, Ajax http(s) transport XML/ backend GUI JSON Engine processing XMLHttp Request server objectatdays.com #atdays 12
  • Classic and Ajax Web-apps Classic Browser Client Server Side Http Request Web-server Data store, http(s) transport backend GUI Http Response processing HTML + javascript + CSS data AJAX Browser Client Server Side JavaScript (XML)Http Request Web/ call Data store, Ajax http(s) transport XML/ backend GUI JSON Engine (XML) Http Response processing XMLHttp Request server object XML/JSONatdays.com #atdays 13
  • Classic and Ajax Web-apps Classic Browser Client Server Side Http Request Web-server Data store, http(s) transport backend GUI Http Response processing HTML + javascript + CSS data AJAX Browser Client Server Side JavaScript (XML)Http Request Web/ call Data store, Ajax http(s) transport XML/ backend GUI HTML+CSS JSON Engine (XML) Http Response processing XMLHttp Request server object XML/JSONatdays.com #atdays 14
  • Classic and Ajax Web-apps Classic Browser Client Server Side Http Request Web-server Data store, http(s) transport backend GUI Http Response processing Size - Big AJAX Browser Client Server Side JavaScript (XML)Http Request Web/ call Data store, Ajax http(s) transport XML/ backend GUI HTML+CSS JSON Engine (XML) Http Response processing XMLHttp Request server object Size - Smallatdays.com #atdays 15
  • Classic Request Response Post HTML Pageatdays.com #atdays 16
  • Classic Request Response Post HTML Page Request AJAX JSON Response Post Part of a page a) b)atdays.com #atdays 17
  • (AJAX) JSON Response Part of a page a) b)atdays.com #atdays 18
  • Vaadin}> (GWT) Ajax frameworkatdays.com #atdays 19
  • Vaadin}> (GWT) Ajax framework Server Side Backend Processing Browser Client VaadinGWT widgets Server-side GUI GWT Web Java GUI Server (javascript) objects UIDL - User Interface Description Languageatdays.com #atdays 20
  • Vaadin}> (GWT) Ajax framework Server Side Backend Processing Browser Client VaadinGWT widgets Server-side GUI GWT Mirroring (GUI) Web Java GUI Server (javascript) objects UIDL - User Interface Description Languageatdays.com #atdays 21
  • Vaadin}> (GWT) Ajax framework Server Side Backend Processing Browser Client VaadinGWT widgets Server-side GUI GWT Web Java GUI Server (javascript) objects UIDL - User Interface Description Languageatdays.com #atdays 22
  • Vaadin}> (GWT) Ajax framework Server Side Backend Processing Browser Client VaadinGWT widgets UIDL Server-side GUI GWT Vaadin Web Java GUI Engine Server (javascript) objects (javascript) UIDL - User Interface Description Languageatdays.com #atdays 23
  • Vaadin}> (GWT) Ajax framework Server Side Backend Processing Browser Client JSON (UIDL) VaadinGWT widgets UIDL Server-side GUI GWT Vaadin Web Java GUI Engine Server (javascript) objects (javascript) UIDL - User Interface Description Languageatdays.com #atdays 24
  • Vaadin}> (GWT) Ajax framework Server Side Backend Processing Browser Client JSON (UIDL)GWT widgets (XML) Http Request Vaadin UIDL Server-side GUI GWT Vaadin http(s) transport Web Java GUI Engine Server (javascript) objects (javascript) UIDL - User Interface Description Languageatdays.com #atdays 25
  • Vaadin}> (GWT) Ajax framework Server Side Backend Processing Browser Client JSON (UIDL)GWT widgets (XML) Http Request Vaadin UIDL Server-side GUI GWT Vaadin http(s) transport Web Java GUI Engine Server UIDL (javascript) objects (javascript) UIDL - User Interface Description Languageatdays.com #atdays 26
  • Vaadin}> (GWT) Ajax framework Server Side Backend Processing Browser Client JSON (UIDL)GWT widgets (XML) Http Request Vaadin UIDL Server-side GUI GWT Vaadin http(s) transport Web Java GUI Engine Server UIDL (XML) Http Response objects (javascript) (javascript) JSON (UIDL) UIDL - User Interface Description Languageatdays.com #atdays 27
  • UIDL Request (Post) (Show Notifications window) (UIDL) JSON Response (Rendering Notifications window)atdays.com #atdays 28
  • UIDL Request (Post) (Show Notifications window) (UIDL) JSON Response (Rendering Notifications window)atdays.com #atdays 29
  • UIDL Request (Post) (Show Notifications window) (UIDL) JSON Response (Rendering Notifications window) Element Type Paintable ID Argumentsatdays.com #atdays 30
  • MAIN DIFFICULTIES OF PERFORMANCE TESTING OF AJAX APPLICATIONS WITH JMETER AND THEIR SOLUTIONSatdays.com #atdays 31
  • MAIN DIFFICULTIES OF PERFORMANCE TESTING OF AJAX APPLICATIONS WITH JMETER AND THEIR SOLUTIONSatdays.com #atdays 32
  • MAIN DIFFICULTIES OF PERFORMANCE TESTING OF AJAX APPLICATIONS WITH JMETER AND THEIR SOLUTIONSatdays.com #atdays 33
  • MAIN DIFFICULTIES OF PERFORMANCE TESTING OF AJAX APPLICATIONS WITH JMETER AND THEIR SOLUTIONSatdays.com #atdays 34
  • Typical Performance/Load Testing Stages Identify the Test Environment Identify Performance Acceptance Criteria Plan and Design Usage Scenarios Implement the Usage Scenarios (Scripts) Configure the Test Environment Execute the Test Analyze Results, Report, and Retestatdays.com #atdays 35
  • Typical Performance/Load Testing Stages Identify the Test Environment Identify Performance Acceptance Criteria Plan and Design Usage Scenarios Implement the Usage Scenarios (Scripts) Configure the Test Environment Execute the Test Analyze Results, Report, and Retestatdays.com #atdays 36
  • Problems in Details: Typical Ajax Applications Unreadable Responses/Requests Hard to find consistency between Responses/Requests and GUI elements Dynamic IDs Sequential dependency between requestsatdays.com #atdays 37
  • Problems in Details: Vaadin (UIDL) Ajax Applications The same URL for most requests(Vaadin) Dependency on Screen Resolution (Vaadin) Error requests are not evident (Vaadin) Too many requests (Vaadin)atdays.com #atdays 38
  • SOLUTIONSatdays.com #atdays 40
  • Unreadable Responses/Requestsatdays.com #atdays 41
  • Unreadable Responses/Requests 1. Get used to this formatatdays.com #atdays 42
  • 2. Use JSON Viewersatdays.com #atdays 43
  • 3. Use JSON Parsersatdays.com #atdays 44
  • 4. Parse JSON Yourselfatdays.com #atdays 45
  • Hard to find consistency between Responses/Requests and GUI elementsatdays.com #atdays 46
  • Hard to find consistency between Responses/Requests and GUI elements 1. Use self-explanatory named IDs (classes) for GUI elementsatdays.com #atdays 47
  • Hard to find consistency between Responses/Requests and GUI elements 1. Use self-explanatory named IDs (classes) for GUI elementsatdays.com #atdays 48
  • 2. Use Anchorsatdays.com #atdays 49
  • 2. Use Anchors SAMPLE Scenario: 1. Create a ticket via email in the task management system 2. Check that the ticket is created 3. Delete the ticketatdays.com #atdays 50
  • 1) Creating a ticket via email (SMTP Sampler) 2. Use Anchorsatdays.com #atdays 51
  • 1) Creating a ticket via email (SMTP Sampler) 2. Use Anchors 2) Login into the Ticket Systematdays.com #atdays 52
  • 1) Creating a ticket via email (SMTP Sampler) 2. Use Anchors 2) Login into the Ticket System3) Request to show tickets atdays.com #atdays 53
  • 1) Creating a ticket via email (SMTP Sampler) 2. Use Anchors 2) Login into the Ticket System3) Request to show tickets 4) JSON Response (Tickets page) atdays.com #atdays 54
  • 1) Creating a ticket via email (SMTP Sampler) 2. Use Anchors 2) Login into the Ticket System 5) Checking whether the ticket is created3) Request to show tickets 4) JSON Response (Tickets page) atdays.com #atdays 55
  • 1) Creating a ticket via email (SMTP Sampler) 2. Use Anchors 2) Login into the Ticket System 5) Checking whether the ticket is created3) Request to show tickets 4) JSON Response (Tickets page)6) Extracting ticket ID (Regular Expression Extractor) atdays.com #atdays 56
  • 1) Creating a ticket via email (SMTP Sampler) 2. Use Anchors 2) Login into the Ticket System 5) Checking whether the ticket is created3) Request to show tickets 4) JSON Response (Tickets page)6) Extracting ticket ID (Regular Expression Extractor) 7) Request to Delete ticket atdays.com #atdays 57
  • Dynamic IDsatdays.com #atdays 58
  • Dynamic IDs Put Your application into the mode with Static IDs (Don’t forget to restore this mode every time you run scripts)atdays.com #atdays 59
  • Dynamic IDs Put Your application into the mode with Static IDs (Don’t forget to restore this mode every time you run scripts) Set specific (debug) IDs for your GUI elements <h2 id=“AjaxPTproblems">atdays.com #atdays 60
  • Dynamic IDs Put Your application into the mode with Static IDs (Don’t forget to restore this mode every time you run scripts) Set specific (debug) IDs for your GUI elements <h2 id=“AjaxPTproblems"> Use anchorsatdays.com #atdays 61
  • Sequential dependency between requests E.g.: IDs of all If dynamic IDs are tree elements used, sequential changes every time I make dependency changes to between requests the tree happens - it means that previous actions may influence next actions and the order of actions mattersatdays.com #atdays 62
  • Sequential dependency between requests Define definite initial data in the tested applicationatdays.com #atdays 63
  • Sequential dependency between requests Define definite initial data in the tested application Breakdown scenarios into undependable chunksatdays.com #atdays 64
  • Sequential dependency between requests Define definite initial data in the tested application Breakdown scenarios into undependable chunks Record scenarios from the beginning to the end of the chunksatdays.com #atdays 65
  • Sequential dependency between requests Define definite initial data in the tested application Breakdown scenarios into undependable chunks Record scenarios from the beginning to the end of the chunks Separate chunks using login/logout (because initialization of IDs happens after login)atdays.com #atdays 66
  • Exampleatdays.com #atdays 68
  • The same URL for the most requests (Vaadin) Rename During Recording Rename requests during traffic recording - at once as a certain definite action is made by you in a web-browser.atdays.com #atdays 69
  • Dependency on Screen Resolution (Vaadin) Screen coordinates are used while accessing these buttons Define one screen resolution for your tests and record traffic only for itatdays.com #atdays 70
  • Error requests are not evident (Vaadin) The response code for Vaadin “Out of Sync” and other response Errors is still HTTP/1.1 200atdays.com #atdays 71
  • Put Global Response Assertion on the test plan levelatdays.com #atdays 72
  • Too many requests (Vaadin)atdays.com #atdays 73
  • Too many requests (Vaadin) Get used to it! atdays.com #atdays 74
  • Other Problems Difficulty to make estimations Script creation for (full) AJAX application takes ~ 3-4 times more than for Classic applicationatdays.com #atdays 75
  • Other Problems Difficulty to make estimations Script creation for (full) AJAX application takes ~ 3-4 times more than for Classic application Bad Supportability (Vaadin) If application changes in most cases you have to recreate the affected scenarios completely.atdays.com #atdays 76
  • Conclusionsatdays.com #atdays 77
  • Vladimir Primakov Email: v.v.primakov@gmail.com Skype: vladimir.primakovatdays.com #atdays 78