-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Making End to End Tests
Also referred to as System Testing or E2E, allows you to test a fully integrated system or application. In this scope, E2E testing seeks to mimic user behavior and inspect the response presented through the web browser.
Using Protractor it is possible to do E2E testing with Mean. It allows for direct browser manipulation through Selenium WebDriver, and is designed to integrate well with AngularJS based projects.
- Java - for running Selenium
- Browser(s)
- Chrome
- FireFox
- Others, though Chrome and FireFox are used by default
E2E tests are written the same as other tests. The default setup is using jasmine so you'll have the familiar describe() and it() BDD style tests.
Here's a sample test that checks to ensure the title includes "MEAN":
describe('Smoke test home page', function(){
it('title should contain MEAN', function(){
browser.get('/');
expect(browser.getTitle()).toMatch(/.*MEAN.*/);
});
});
The core coding difference between these tests and unit tests is Protractor's inclusion of the browser object. It allows direct interaction with the web browser that's being tested.
- Getting Started Guides
- Deployment
- Testing
- System Deep Dives
Aggregation- Packages
- Database
- Menus
- Circles (roles/permissions) High Level Overview
- Circles code examples
- User Auth withJWT
- Contributing