41
End-2-End testing of MEAN Applications Mihai-Cristian Fratila QA Engineer HPLN R&D team

End 2-end testing of mean applications

Embed Size (px)

Citation preview

Page 1: End 2-end testing of mean applications

End-2-End testing of MEAN Applications

Mihai-Cristian FratilaQA Engineer

HPLN R&D team

Page 2: End 2-end testing of mean applications

Why do we need automated e2e testing?

Page 3: End 2-end testing of mean applications

Why do we need automated e2e testing?

- Increases tester’s motivation

Page 4: End 2-end testing of mean applications

Why do we need automated e2e testing?

- Increases tester’s motivation- Work process gets to be more dynamic

Page 5: End 2-end testing of mean applications

Why do we need automated e2e testing?

- Increases tester’s motivation- Work process gets to be more dynamic- Good quality of the product

Page 6: End 2-end testing of mean applications

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

Page 7: End 2-end testing of mean applications

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

Page 8: End 2-end testing of mean applications

Old HP Live Network Portal

Page 9: End 2-end testing of mean applications

How can we improve the quality?

Page 10: End 2-end testing of mean applications

How can we improve the quality?- Click & Record tools -> first step into automation- Selenium Builder

Page 11: End 2-end testing of mean applications

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

Page 12: End 2-end testing of mean applications

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

Page 13: End 2-end testing of mean applications

Selenium Builder

Page 14: End 2-end testing of mean applications

Selenium Builder- Advantages:

- Record multiple scenarios and re-run them every time it was needed- Increase testing speed - Catch regression defects faster

Page 15: End 2-end testing of mean applications

Selenium Builder- Disadvantage:

Page 16: End 2-end testing of mean applications

Selenium Builder- Disadvantage:

Page 17: End 2-end testing of mean applications

New MEAN Portal- What’s changed from UX and user’s E2E point of view?

Page 18: End 2-end testing of mean applications

New MEAN Portal- What’s changed from UX and

user’s E2E point of view?- Single-Page App.

Page 19: End 2-end testing of mean applications

New MEAN Portal- What’s changed from UX and

user’s E2E point of view?- Single-Page App.

- Content displayed dynamic.

Page 20: End 2-end testing of mean applications

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.

Page 21: End 2-end testing of mean applications

New MEAN Portal

Page 22: End 2-end testing of mean applications

New MEAN Portal

Page 23: End 2-end testing of mean applications

- Selenium Builder could not achieve this

Page 24: End 2-end testing of mean applications

- Selenium Builder could not achieve this

- Export Selenium Builder scenarios

Page 25: End 2-end testing of mean applications

- Selenium Builder could not achieve this

- Export Selenium Builder scenarios

- Protractor

Page 26: End 2-end testing of mean applications

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

Page 27: End 2-end testing of mean applications

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

Page 28: End 2-end testing of mean applications

Protractor

Page 29: End 2-end testing of mean applications

Protractor- Test Angular pages alongside non-Angular pages.

- Set up this framework independently from the developer’s code.

Page 30: End 2-end testing of mean applications

Protractor- Test Angular pages alongside non-Angular pages.

- Set up this framework independently from the developer’s code.

Achievements:

Page 31: End 2-end testing of mean applications

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

Page 32: End 2-end testing of mean applications

Old vs. MEAN

- No automated e2e tests- Old technology- Regression defects uncaught

Page 33: End 2-end testing of mean applications

Old vs. MEAN

- No automated e2e tests- Old technology- Regression defects uncaught

- Automated e2e tests with Protractor

- MEAN technology- Regression defects caught in time

Page 34: End 2-end testing of mean applications

What’s next?

Page 35: End 2-end testing of mean applications

What’s next?- Integration with our CI tools- Run the tests as part of a nightly build - Collect reports after running the suite

Page 36: End 2-end testing of mean applications

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

Page 37: End 2-end testing of mean applications

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

Page 38: End 2-end testing of mean applications

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

Page 39: End 2-end testing of mean applications

DEMO

Page 41: End 2-end testing of mean applications

DEMO- Let’s keep in touch: [email protected]

- More about my work: https://tribulit.ro/