lundi 27 avril 2015

Run same Protractor specs against multiple "versions" of the same page

The scenario:

I am currently working on a Chrome extension which provides some extra tooling when on a page with an Angular app.

The guts of the extension are written in such a way that they can also just be included in a standard page (great for testing purposes).

My goal for testing is to be able to run the same tests, against multiple different versions of Angular.

I am currently only running tests against 1.3, which I do by:

  1. Writing simple apps in individual HTML files for each different scenario, that manually include a reference to Angular 1.3
  2. Running a static file server to host the apps
  3. Hitting that local server within my Protractor specs

The problem with this strategy obviously is that a reference to 1.3 is hard-coded. But the other issue is that I have not identified a way that I can re-run the same spec multiple times (I'd need to re-run it once for each Angular version).

This feels like an unusual use-case for Protractor, but it's possible I'm just not thinking outside the box.

Aucun commentaire:

Enregistrer un commentaire