TransWikia.com

Protractor E2E Test Cases migration from Angular 2+ application to React

Software Quality Assurance & Testing Asked on October 25, 2021

If we have E2E test cases written for an Angular2+ application using protactor, if we migrate the Angular2+ application to React, how difficult it will be to migrate those E2E test cases to work against the React application (after migration)?

One Answer

If your tests were written correctly - then you'll have to replace your infrastructure layer with another module that would support React. You can estimate that task depending on the size and complexity of your existing module.

By "correctly" I mean the architectural separation between test definition layer and test adaptation/infrastructure (Protractor) layer.

Another point that you need to consider - is rewriting the angular specific locators (finding elements by ng-something), to more generic, that would suit the React UI as well.

In other words, as long as your test code/page objects do not contain plain calls to Protractor, and you are accessing it via your custom wrapper - you would only have to replace the content of the wrapper, without affecting the client code.

Answered by 501NotImplemented on October 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP