"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/3.api.write/4.write.app.metrics.js" between
countly-server-20.04.1.4.tar.gz and countly-server-20.04.1.5.tar.gz

About: countly-server is a mobile & web analytics, push notifications and crash reporting platform. This is the server part that collects and analyzes data while individual client SDKs (mobile, web or desktop) send the data. Community Edition (commercial Enterprise Edition also available).

4.write.app.metrics.js  (countly-server-20.04.1.4):4.write.app.metrics.js  (countly-server-20.04.1.5)
skipping to change at line 393 skipping to change at line 393
testUtils.validateMetrics(err, res, done, {meta: {"os": ["Android", "IOS"], "os_versions": ["4:4", "a4:4", "i7:1"], "resolutions": ["120 0x800", "2048x1536"], "app_versions": ["1:0", "1:2"]}, Android: {"n": 2, "t": 2, "u": 2}, "a4:4": {"n": 1, "t": 1, "u": 1}, "4:4": {"n": 1, "t": 1, "u": 1}, "12 00x800": {"n": 1, "t": 1, "u": 1}, "1:0": {"n": 1, "t": 1, "u": 1}, "IOS": {"n": 1, "t": 1, "u": 1}, "i7:1": {"n": 1, "t": 1, "u": 1}, "2048x1536": {"n": 1, "t" : 1, "u": 1}, "1:2": {"n": 1, "t": 1, "u": 1}}); testUtils.validateMetrics(err, res, done, {meta: {"os": ["Android", "IOS"], "os_versions": ["4:4", "a4:4", "i7:1"], "resolutions": ["120 0x800", "2048x1536"], "app_versions": ["1:0", "1:2"]}, Android: {"n": 2, "t": 2, "u": 2}, "a4:4": {"n": 1, "t": 1, "u": 1}, "4:4": {"n": 1, "t": 1, "u": 1}, "12 00x800": {"n": 1, "t": 1, "u": 1}, "1:0": {"n": 1, "t": 1, "u": 1}, "IOS": {"n": 1, "t": 1, "u": 1}, "i7:1": {"n": 1, "t": 1, "u": 1}, "2048x1536": {"n": 1, "t" : 1, "u": 1}, "1:2": {"n": 1, "t": 1, "u": 1}});
}); });
}); });
}); });
describe('verify dashboard', function() { describe('verify dashboard', function() {
it('should have percentage split between os, resolutions and carrier s', function(done) { it('should have percentage split between os, resolutions and carrier s', function(done) {
request request
.get('/o/analytics/dashboard?api_key=' + API_KEY_ADMIN + '&a pp_id=' + APP_ID) .get('/o/analytics/dashboard?api_key=' + API_KEY_ADMIN + '&a pp_id=' + APP_ID)
.expect(200) .expect(200)
.end(function(err, res) { .end(function(err, res) {
testUtils.validateDashboard(err, res, done, {total_sessi ons: 8, total_users: 8, new_users: 8, total_time: "0.0 min", avg_time: "0.0 min" , avg_requests: "1.0", platforms: [{"name": "Android", "value": 2, "percent": 66 }, {"name": "IOS", "value": 1, "percent": 34}], resolutions: [{"name": "1200x800 ", "value": 1, "percent": 50}, {"name": "2048x1536", "value": 1, "percent": 50}] , carriers: [{"name": "Telecom", "value": 1, "percent": 50}, {"name": "Vodafone" , "value": 1, "percent": 50}]}); testUtils.validateDashboard(err, res, done, {total_sessi ons: 8, total_users: 8, new_users: 8, total_time: "0.0 min", avg_time: "0.0 min" , avg_requests: "1.0", platforms: [{"name": "Android", "value": 2, "percent": 67 }, {"name": "IOS", "value": 1, "percent": 33}], resolutions: [{"name": "1200x800 ", "value": 1, "percent": 50}, {"name": "2048x1536", "value": 1, "percent": 50}] , carriers: [{"name": "Telecom", "value": 1, "percent": 50}, {"name": "Vodafone" , "value": 1, "percent": 50}]});
}); });
}); });
}); });
}); });
describe('same metrics new user', function() { describe('same metrics new user', function() {
describe('GET request', function() { describe('GET request', function() {
it('should success', function(done) { it('should success', function(done) {
var params = {"_os": "IOS", "_os_version": "7.1", "_resolution": "2048x1536", "_device": "iPod", "_carrier": "Telecom", "_app_version": "1.2"}; var params = {"_os": "IOS", "_os_version": "7.1", "_resolution": "2048x1536", "_device": "iPod", "_carrier": "Telecom", "_app_version": "1.2"};
request request
.get('/i?device_id=' + DEVICE_ID + '10&app_key=' + APP_KEY + "&begin_session=1&metrics=" + JSON.stringify(params)) .get('/i?device_id=' + DEVICE_ID + '10&app_key=' + APP_KEY + "&begin_session=1&metrics=" + JSON.stringify(params))
skipping to change at line 461 skipping to change at line 461
testUtils.validateMetrics(err, res, done, {meta: {"os": ["Android", "IOS"], "os_versions": ["4:4", "a4:4", "i7:1"], "resolutions": ["120 0x800", "2048x1536"], "app_versions": ["1:0", "1:2"]}, Android: {"n": 2, "t": 2, "u": 2}, "a4:4": {"n": 1, "t": 1, "u": 1}, "4:4": {"n": 1, "t": 1, "u": 1}, "12 00x800": {"n": 1, "t": 1, "u": 1}, "1:0": {"n": 1, "t": 1, "u": 1}, "IOS": {"n": 2, "t": 2, "u": 2}, "i7:1": {"n": 2, "t": 2, "u": 2}, "2048x1536": {"n": 2, "t" : 2, "u": 2}, "1:2": {"n": 2, "t": 2, "u": 2}}); testUtils.validateMetrics(err, res, done, {meta: {"os": ["Android", "IOS"], "os_versions": ["4:4", "a4:4", "i7:1"], "resolutions": ["120 0x800", "2048x1536"], "app_versions": ["1:0", "1:2"]}, Android: {"n": 2, "t": 2, "u": 2}, "a4:4": {"n": 1, "t": 1, "u": 1}, "4:4": {"n": 1, "t": 1, "u": 1}, "12 00x800": {"n": 1, "t": 1, "u": 1}, "1:0": {"n": 1, "t": 1, "u": 1}, "IOS": {"n": 2, "t": 2, "u": 2}, "i7:1": {"n": 2, "t": 2, "u": 2}, "2048x1536": {"n": 2, "t" : 2, "u": 2}, "1:2": {"n": 2, "t": 2, "u": 2}});
}); });
}); });
}); });
describe('verify dashboard', function() { describe('verify dashboard', function() {
it('should have percentage split for platforms, resolutions and carr iers', function(done) { it('should have percentage split for platforms, resolutions and carr iers', function(done) {
request request
.get('/o/analytics/dashboard?api_key=' + API_KEY_ADMIN + '&a pp_id=' + APP_ID) .get('/o/analytics/dashboard?api_key=' + API_KEY_ADMIN + '&a pp_id=' + APP_ID)
.expect(200) .expect(200)
.end(function(err, res) { .end(function(err, res) {
testUtils.validateDashboard(err, res, done, {total_sessi ons: 9, total_users: 9, new_users: 9, total_time: "0.0 min", avg_time: "0.0 min" , avg_requests: "1.0", platforms: [{"name": "Android", "value": 2, "percent": 50 }, {"name": "IOS", "value": 2, "percent": 50}], resolutions: [{"name": "2048x153 6", "value": 2, "percent": 66}, {"name": "1200x800", "value": 1, "percent": 34}] , carriers: [{"name": "Telecom", "value": 2, "percent": 66}, {"name": "Vodafone" , "value": 1, "percent": 34}]}); testUtils.validateDashboard(err, res, done, {total_sessi ons: 9, total_users: 9, new_users: 9, total_time: "0.0 min", avg_time: "0.0 min" , avg_requests: "1.0", platforms: [{"name": "Android", "value": 2, "percent": 50 }, {"name": "IOS", "value": 2, "percent": 50}], resolutions: [{"name": "2048x153 6", "value": 2, "percent": 67}, {"name": "1200x800", "value": 1, "percent": 33}] , carriers: [{"name": "Telecom", "value": 2, "percent": 67}, {"name": "Vodafone" , "value": 1, "percent": 33}]});
}); });
}); });
}); });
}); });
describe('reset app', function() { describe('reset app', function() {
describe('reseting data', function() { describe('reseting data', function() {
it('should reset data', function(done) { it('should reset data', function(done) {
var params = {app_id: APP_ID}; var params = {app_id: APP_ID};
request request
.get('/i/apps/reset?api_key=' + API_KEY_ADMIN + "&args=" + J SON.stringify(params)) .get('/i/apps/reset?api_key=' + API_KEY_ADMIN + "&args=" + J SON.stringify(params))
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)