CXOptimize is a framework that allows for the identification & resolution of performance issues for web/mobile applications, early in the development lifecycle. Some of the features are as listed below:
-
Automated Analysis
- Threshold Analysis – Comparison against threshold values like SLAs and Baseline
- Correlative Analysis - Analyze response time break down across different tiers and at component level
- Comparative Analysis - Compare against previous build performance and provides insight into deviation
-
Collects and presents Comprehensive list of metrics like:
- Total Pageload Time
- Page Onload Time
- Frontend Time (time taken in client)
- Backend Time (time taken for resource calls)
- SpeedIndex
- Time to first byte
- Time to first paint
- Granular Navigation Timing
- No of HTTP calls
- Total Page Payload
- Cache header
- Compression
- Style Sheet & Script placement
- CSS, Javascript, Image size
- No. of DOM elements
- HAR Viewer
- Time distribution for each domain
-
Integrates seamlessly with a variety of test automation tools like Selenium Java,Selenium C#,CodedUI et al.
-
Integrates with several Cognizant QA Frameworks such as Spritz,CRAFT et al.
1. No HTTP 2.0 support
2. The product works only on the browsers which support both Navigation & Resource Timing API support.
3. Browser plugin is available only for Chrome.
4. Browser plugin doesnt support any Single Page Application(SPA's).
5. Browser Plugin & Javascript Collector cannot get details header details of each resource compared to UI Automation Collection approach.Due to this while evaluating the score for a transaction the rules related to those headers will not be considered.
6. Javascript collector cannot support Angular 2 & Angular 4.
CXOptimize can be implemented in three different ways:
- In conjunction with automation frameworks such as Selenium,CodedUI to provide client side performance metrics along with recommendations.
- As a chrome plugin
- As JavaScript’s which can be injected to collect performance data for each of the pages.
The entire process can be explained in terms of four steps:
- Test Automation Engineer injects Asynchronous collectors (to collect performance test metrics) and statements to collect performance metrics into the automated test script.
- Test Automation Engineer executes automated test scripts as usual. Single-user Performance Testing metrics are automatically measured and collected.
- Collected metrics are pushed asynchronously to the CXOptimize Analytical Engine for treatment and consolidation into the centralized database.
- Performance Test Engineer can now view single-user performance test statistics using the CXOptimize Dashboard.
CXOptimize can also be implemented via the means of a chrome plugin. The plugin will capture performance statistics of each page navigated in different tabs of the browser.
You can also implement CXOptimize by injecting custom JavaScript’s at head of the web page either statically or dynamically. This will allow for metrics to be captured for different applications deployed onto your server.
The various components of CXOptimize are
- Collector – Contains utilities to collect and persist data via API.
- Caddy – lightweight Web Server
- CXOptimize API – API Layer which stores and processes data within data store
- CXOptimize UI – Presentation tier to summarize the current execution data with respect to performance
- Elastic Search (5.5.2) – Data storage
- Kibana (5.5.2) – trending dashboard
- (optional) Grafana - trending dashboard
- (optional) GeoIp - golang utility to provide geolocation data.
Below is the approach used to calculate CXOptimize Overall score.
Overall Score = (%Total Score Compliance * Weightage) + (%Individual Score Compliance * Weightage) + (%Comparison Compliance * Weightage) + (%SLA Compliance * Weightage)
Compliance | Description | Weightage | Calculation Details |
---|---|---|---|
Total Score | Average score of all individual transactions within given RunID is above configured threshold | 25% | calculated as aggregated average value (Txn1 + ..+ Txn N)/N |
Individual Score | Number of transactions within given RunID is above configured threshold for individual transaction score | 25% | calculated as count of transactions within configured score threshold/total transactions |
Comparison | Number of transactions within given RunID is above configured threshold for comparison deviation | 25% | calculated as count of transactions within configured comparison deviation threshold/total transactions |
SLA | Number of transactions within given RunID is above configured SLA | 25% | calculated as count of transactions within configured SLA threshold/total transactions |
Each compliance has default thrshold of 80% which can be modified as part of centralized configuration (Settings Page - Edit config Tab in UI)
All weightages can be changed as part of centralized configuration (Settings Page - Edit SLA in UI)
Following industry standard best practice are created as rules as part of the CXOptimize API and each web transaction is compared against these rules to calculate transaction score.These rules are widely used industry standard tools like YSlow,Pagespeed,WebPageTest etc. For CXOptimize these rules score calculation are customized as below
These rules are applicable to Hard navigation & Soft navigation with weightage varying for them respectively
Rule ID | Description | Weightage (Hard) | Weightage (Soft) | Calculation Details |
---|---|---|---|---|
1 | Avoid CSS @import | 2% | NA | score = (100 - count * 10),where count = no of occurance of @image,if score < 0 then 0 |
2 | Minify HTML document | 5% | NA | score = (100 - ((htmlsize - compressedHtmlsize)/htmlSize) , only if htmlSize > 14 KB |
3 | Minimize iFrames Usage | 1% | NA | score = (100 - count * 5),where count = no of occurance of IFRAMEs,if score < 0 then 0 |
4 | Avoid empty SRC or HREF | 2% | NA | |
5 | Specify image dimensions | 6% | NA | score = (100 - count * 5),where count = no of occurance of IMG tag without width,height or style,if score < 0 then 0 |
6 | Do not scale images in HTML | 3% | NA | score = (100 - count * 1),where count = no of occurance of IMG with scaling,if score < 0 then 0 |
7 | Remove unnecessary comments | 1% | NA | score = (100 - ((htmlsize - commentsize)/htmlSize) |
8 | Avoid a character set in the meta tag | 5% | NA | |
9 | Make CSS external | 3% | NA | score = (100 - count * 10),where count = no of occurance of inline CSS,if score < 0 then 0 |
10 | Put CSS at the top | 8% | NA | score = (100 - count * 10),where count = no of occurance of STYLE in Body,if score < 0 then 0 |
11 | Make JS external | 3% | NA | score = (100 - count * 5),where count = no of occurance of inline Javascript,if score < 0 then 0 |
12 | Put JavaScript at bottom | 8% | NA | score = (100 - count * 5),where count = no of occurance of javascript in HEAD without async/defer,if score < 0 then 0 |
13 | Prefer asynchronous resources | 8% | NA | score = (100 - count * 2),where count = no of occurance of javascript without async,if score < 0 then 0 |
14 | Reduce the number of DOM elements | 1% | NA | score = (100 - domsize),where domsize = (domelements-900)/250,if score < 0 then 0 |
15 | Avoid bad request | 3% | 6% | score = (100 - count * 10),where count = no of occurance of 400s,if score < 0 then 0 |
16 | Make fewer HTTP requests | 10% | 10% | score = (100 - (count - 20) * 10),where count = no of resources called in the page,if score < 0 then 0 |
17 | Optimize images PNG/JPG | 1% | 6% | score = (100 - (count - 9) * 11),where count = no of occurance of PNG and JPG,if score < 0 then 0 |
18 | Use PNG/JPG instead of GIF | 1% | 10% | score = (100 - count * 5),where count = no of occurance of GIF,if score < 0 then 0 |
19 | Parallelize downloads across hostnames | 2% | NA | score = ((count/4 * 100)),where count = no of domain used to serve resources,if score < 0 then 0 |
20 | Avoid Landing Page redirects | 1% | NA | |
21 | Avoid URL redirects resources | 1% | 6% | score = (100 - count * 5),where count = no of occurance of resources redirected,if score < 0 then 0 |
22 | Set Proper Cache Header | 5% | 10% | score = (100 - count * 10),where count = no of occurance of resources without proper cache header,if score < 0 then 0 |
23 | Specify a cache validator | 2% | 10% | score = (100 - count * 10),where count = no of occurance of resources without proper cache validator,if score < 0 then 0 |
24 | Specify a Vary: Accept-Encoding header | 1% | 2% | score = (100 - count * 10),where count = no of occurance of resources without Vary header,if score < 0 then 0 |
25 | Enable Keep Alive | 2% | 2% | score = (100 - count * 11),where count = no of occurance of resources without Keepalive header,if score < 0 then 0 |
26 | Avoid Duplicate Resources | 1% | 6% | score = (100 - count * 20),where count = no of occurance of duplicate resources,if score < 0 then 0 |
27 | Avoid Resources with Query String | 1% | 2% | score = (100 - count * 10),where count = no of occurance of resource with query string,if score < 0 then 0 |
28 | Avoid Flash | 1% | 2% | score = (100 - count * 10),where count = no of occurance of Flash,if score < 0 then 0 |
29 | Compress Static files | 4% | 10% | score = (100 - count * 10),where count = no of occurance of resource without compression,if score < 0 then 0 |
30 | Minify CSS and JS | 4% | 10% | score = (100 - count * 10),where count = no of occurance of resource without minification,if score < 0 then 0 |
31 | Increase caching duration | 4% | 8% | score = (100 - count * 10),where count = no of occurance of resources with expiray less than hour,if score < 0 then 0 |
Index Name | Table Name | Purpose |
---|---|---|
masterconfig | config | used to store centralized configuration specific to client,project and scenario |
masterconfig | rules | used to store default configuration data which will be used by any new project while creation |
statsindex | run | used to store the raw data collected from different source of collectors |
markindex | mark | used to store data custom performance marker data collected by collectors |
baselineindex | baseline | used to store baseline value for each transaction for the given combination |
analysisindex | analysis | used to persist analysis results of each run inorder to cache them |
userdetails | user | used to store user and password details for the system |
auditlog | audit | used to store audit logs of tools usage which can be used for custom dashboard |