Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Using protractor to build automated ui tests
1. Using Protractor to Build
Automated UI Tests
DALE SPOONEMORE @DALESPOONEMORE
DALE@SEEDTOSPOON.NET WWW.SEEDTOSPOON.NET
2. Why Use Automated Testing?
• Smoke Tests
• Know when apps are down or having performance issues
• Functional UI tests
• Tests that are tedious and time consuming
• Testing with lots of data
3. But I have unit tests…
◦ Doesn’t test the full spectrum
◦ UI tests launch browser and interact with the browser as a user
◦ Tests database, UI, server-side code, server/network hardware
6. Basic test script
// spec.js
describe('From Seed to Spoon Smoke Test', function() {
it('should verify the main page loads', function() {
browser.get('http://www.seedtospoon.net/');
expect(element(by.css('h2.maintitle')).getText()).toEqual('Grow Your Own Food');
});
});
7. Interacting with elements
Protractor Cheat Sheet
https://gist.github.com/javierarques/0c4c817d6c77b0877fda
Find Elements by
• ID
• CSS
• Angular specific (model, binding, etc…)
•Multiple Elements with same identifiers
var list = element.all(by.css('.items));
expect(list.get(0).getText()).toBe('First’)