end 2-end testing of mean applications
TRANSCRIPT
End-2-End testing of MEAN Applications
Mihai-Cristian FratilaQA Engineer
HPLN R&D team
Why do we need automated e2e testing?
Why do we need automated e2e testing?
- Increases tester’s motivation
Why do we need automated e2e testing?
- Increases tester’s motivation- Work process gets to be more dynamic
Why do we need automated e2e testing?
- Increases tester’s motivation- Work process gets to be more dynamic- Good quality of the product
Why do we need automated e2e testing?
- Increases tester’s motivation- Work process gets to be more dynamic- Good quality of the product
- Regression defects found in time
Why do we need automated e2e testing?
- Increases tester’s motivation- Work process gets to be more dynamic- Good quality of the product
- Regression defects found in time- Avoids repeatability
Old HP Live Network Portal
How can we improve the quality?
How can we improve the quality?- Click & Record tools -> first step into automation- Selenium Builder
Selenium Builder- Firefox addon, open source, hosted on Github- Records user’s actions on a website- Save script and run it locally or on a Selenium Server
Selenium Builder- Firefox addon, open source, hosted on Github- Records user’s actions on a website- Save script and run it locally or on a Selenium Server
Selenium Builder
Selenium Builder- Advantages:
- Record multiple scenarios and re-run them every time it was needed- Increase testing speed - Catch regression defects faster
Selenium Builder- Disadvantage:
Selenium Builder- Disadvantage:
New MEAN Portal- What’s changed from UX and user’s E2E point of view?
New MEAN Portal- What’s changed from UX and
user’s E2E point of view?- Single-Page App.
New MEAN Portal- What’s changed from UX and
user’s E2E point of view?- Single-Page App.
- Content displayed dynamic.
New MEAN Portal- What’s changed from UX and
user’s E2E point of view?- Single-Page App.
- Content displayed dynamic.
- Transition between states is done in a flawless way. No lag or glitches.
New MEAN Portal
New MEAN Portal
- Selenium Builder could not achieve this
- Selenium Builder could not achieve this
- Export Selenium Builder scenarios
- Selenium Builder could not achieve this
- Export Selenium Builder scenarios
- Protractor
Protractor- End 2 end testing framework for Angular JS applications- Open source, hosted on GitHub- Records tests running in a real browser- Interacts with page element as the real user would- Uses the Jasmine framework for testing Javascript code
Protractor- End 2 end testing framework for Angular JS applications- Open source, hosted on GitHub- Records tests running in a real browser- Interacts with page element as the real user would- Uses the Jasmine framework for testing Javascript code
Protractor
Protractor- Test Angular pages alongside non-Angular pages.
- Set up this framework independently from the developer’s code.
Protractor- Test Angular pages alongside non-Angular pages.
- Set up this framework independently from the developer’s code.
Achievements:
Protractor- Test Angular pages alongside non-Angular pages.
- Set up this framework independently from the developer’s code.
Achievements:- Write efficient tests- Automate as much features as possible- Catch regression defects and keep the product stable- Maintain the tests – project keeps changing
Old vs. MEAN
- No automated e2e tests- Old technology- Regression defects uncaught
Old vs. MEAN
- No automated e2e tests- Old technology- Regression defects uncaught
- Automated e2e tests with Protractor
- MEAN technology- Regression defects caught in time
What’s next?
What’s next?- Integration with our CI tools- Run the tests as part of a nightly build - Collect reports after running the suite
What’s next?- Integration with our CI tools- Run the tests as part of a nightly build - Collect reports after running the suite
- Integrate it to run with multiple browsers, including IE
What’s next?- Integration with our CI tools- Run the tests as part of a nightly build - Collect reports after running the suite
- Integrate it to run with multiple browsers, including IE
- Connect it with our bug tracking tool
What’s next?- Integration with our CI tools- Run the tests as part of a nightly build - Collect reports after running the suite
- Integrate it to run with multiple browsers, including IE
- Connect it with our bug tracking tool
- Measure code coverage
DEMO
DEMO- Let’s keep in touch: [email protected]
- More about my work: https://tribulit.ro/