Migrate from Protractor to Cypress automation test framework

Viewed 441

I'm just starting to look into the amount of work it would take to convert a lot of existing Protractor e2e code/tests to Cypress. Has anyone done this and is there an efficient way to do this without rebuilding all of the code from scratch within Cypress?

Just for a little background, the existing Protractor e2e framework was written in Typescript and uses the Page Object Model design pattern along with object oriented programming concepts -

  • Each UI screen of the AUT has its own class and members (i.e. class CustomerInfo would have firstName field and it's element locator. There are classes for each type of UI element (i.e. text input, dropdown, checkbox).
  • These classes contain methods that encapsulate actions available for the UI element type (i.e. methods within text input class would be - setText, verifyText, clearText, verifyIsEnabled, etc...)

For example, the Protractor e2e test step would look something like:

it("example test case", () => {
     testPage.pageSection.firstName.setText("John");

});

Any ideas on how to migrate from Protractor to Cypress would be extremely helpful.
Thanks!

0 Answers
Related