Trackers: add stress-testing modules
See original GitHub issueTo facilitate stress-testing for trackers we can add modules providing boilerplate code for each tracker allowing us to:
- check how long does it take to send big queue of events
- check if there’s any errors happening due sending big volumes of events
- compare performance of trackers
Though, I don’t see it as unit-test, but rather as manual approach with manual deployment of collector.
Here’s Node.js example:
// npm install node-uuid
// Random generator
var uuid = require('node-uuid');
// Initialization
var snowplow = require('snowplow-tracker');
var emitter = snowplow.emitter;
var tracker = snowplow.tracker;
var errors = [],
successes = [],
unknowns = [];
// Sent event counter
var sentEventCounter = 0;
function trackCallback(error, body, response) { // Callback called for each request
sentEventCounter++;
if (error) {
errors.push({'error': error, 'sentEventCounter': sentEventCounter});
} else if (body.statusCode === 200){
successes.push(sentEventCounter);
} else {
unknowns.push({
'error': error,
'body': body,
'response': response,
'sentEventCounter': sentEventCounter
});
}
}
var e = emitter('collectorUri', 'http', 80, 'POST', 0, cb);
var t = tracker([e], 'myTracker', 'myApp', false);
// Getters
function getSuccesses() { return successes; }
function getErrors() { return errors; }
function getUnknowns() { return unknowns; }
function generateEvent() {
var rnd = uuid.v4();
var pageView = {
'pageUrl': 'http://example.com/' + rnd,
'pageTitle': rnd,
'referrer': rnd
};
t.trackPageView(pageView.pageUrl, pageView.pageTitle, pageView.referrer);
}
function start() {
for (var i = 0; i < 10000; i++) {
generateEvent();
}
}
module.exports = {
generateOneEvent: generateEvent,
getErrors: getErrors,
getSuccesses: getSuccesses,
getUnknowns: getUnknowns,
start: start
};
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:6 (6 by maintainers)
Top Results From Across the Web
10 Best Load Testing Tools For Web Applications In 2022
LoadRunner is a software testing tool that measures system behavior and performance under complex load and stress scenarios.
Read more >Top 12 load testing tools for web applications in 2022
Load testing is a critical aspect of application and web development. Here is an overview of the top load testing tools for web...
Read more >Updating PVEL's PV Module Product Qualification Program
Tracker -mounted mechanical stress testing. Our new, optional add-on protocol for the mechanical stress sequence utilizes a tracker mounting ...
Read more >Top Load Testing Tools: The Best Tools for Load ... - Stackify
Loader.io offers simple cloud-based load testing for stress testing your web apps and APIs with thousands of concurrent connections. Check out ...
Read more >Top 20 Best Test Management Tools (New 2023 Rankings)
It integrates seamlessly with the leading bug tracking tools like JIRA, ... Fully modular test management: Create, import, add or track ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey QA-workgroup (@alexanderdean @BenFradet @jbeemster @ihortom)!
TL;DR I propose a TSV file format that trackers can read to get events and then we can compare Redshift content and these files.
I implemented small PoC of “QuickCheck for Snowplow” in Scala Tracker. It basically consist of:
pv chuwy.me/page.html Main page http://google.com ttm:12312313253
where firstpv
refers to page view and subsequent columns are just tracking functions argument. Having that most of our trackers use same positional argument, I believe this should be quite ubiquitousWhat do I propose here? As I said we can re-use this format to see if there’s any data-loss on Tracker -> Collector part of pipeline, compare tracker’s performance and discover problems.
Move to general tracker (protocol) repo.