7

I want to run e2e test case from the UI.

Use case: i will build one testing page on our dev stack, where anyone can run the protractor test case by click on "run" button.

We have created a shell script (run.sh) where we have mentioned to run webdriver-manager start and protractor conf.js, so i guess we just need to run shell script from the UI.

Apurv
  • 309
  • 2
  • 10
  • I did something like this with Jasmine. Haven't used Protractor so not sure how similar it will be. For my Jasmine tests I created a simple HTML page with links to all of the JS files in the following order: Jasmine, libraries (jQuery and AngularJS), sources under test, tests. This setup executes the tests whenever the page is loaded. – Jack A. Aug 18 '15 at 12:54
  • I need to add buttons like run core test, run mobile test and click on that will actually run test on dev stack – Apurv Aug 18 '15 at 12:56
  • If run-on-load works with Protractor like it does with Jasmine, you could have a parent page that loads the appropriate child (run-on-load) page into an iframe. The child pages would include only the tests you want to run. – Jack A. Aug 18 '15 at 13:08
  • You can easily create a java window with a button on it and specify the path of shell script file to run once you click on it. – giri-sh Aug 18 '15 at 13:47
  • Can you give any lead on the solution? any link? @GirishSortur – Apurv Aug 18 '15 at 14:29
  • I have implement that using node.js – Apurv Apr 05 '16 at 17:39

1 Answers1

2

As mentioned here, you can create a PHP webpage and use shell_exec() to trigger your shell scripts.

Another alternative: my team runs protractor tests via a Hubot integration in Slack.

Community
  • 1
  • 1
Brine
  • 3,733
  • 1
  • 21
  • 38