We are using protractor
for testing internal AngularJS applications.
Besides functional tests, we check for performance regressions with the help of protractor-perf
which is based on nodejs browser-perf
library. Because, "Performance is a feature".
With protractor-perf
we can measure and assert different performance characteristics while making browser actions, for example:
browser.get('http://www.angularjs.org');
perf.start(); // Start measuring the metrics
element(by.model('todoText')).sendKeys('write a protractor test');
element(by.css('[value="add"]')).click();
perf.stop(); // Stop measuring the metrics
if (perf.isEnabled) { // Is perf measuring enabled ?
// Check for perf regressions, just like you check for functional regressions
expect(perf.getStats('meanFrameTime')).toBeLessThan(60);
};
Now, for an another internal application we have a set of selenium-based tests written in Python.
Is it possible to check for performance regressions with selenium-python, or should I rewrite the tests using protractor
to be able to write browser performance tests?