Missed Part 1 of Adventures in Install Protractor? Find it here!
Let’s move on to steps 2 and 3:
This time it worked without an error since I already have java installed on my machine:
Finally I am ready to run the first sample from the protractor tutorial page:
And finally I have my first success:
I played around with the next sample from the tutorial page:
And it also worked as described:
Now I wanted more – I wanted a nice html report coming with the testing. While typing what I wanted into the search bar auto completion conveniently listed a tool for me:
Again I had to run a npm task:
Which for some reason worked perfectly. 😉
Following the documentation I added a couple of lines to my config.js:
However somehow I missed something because now the config.js is no longer valid:
I stumbled over the same issue as here I forgot a “,“ in my config.js
After fixing this issue I finally was able to create a report.
With a stacktrace:
And a screenshot:
Everything is Ok for now – however I haven’t even started to check what else I can do with the whole tool chain. I am pretty sure that there will be other problems waiting for me.
And this will only be the beginning – I have to ask myself a couple of questions:
What about testing web sites on mobile devices which is not even officially supported?
There is a longer guide to use appium together with protractor which will take me another half day or so to get it running.
What if other projects are using different frameworks?
Other teams will prefer other frameworks for which I will need something else.
What about the test cases themselves?
There are BDD style, however somebody has to create them, maintain them, and add new ones – everything in code:
What if I want to check e.g. via a web services if data is properly handed over?
I will need another tool with for sure a totally different approach.
So what do you think? Is it worth the effort?
Testing with Selenium