Choosing a framework for Angular apps testing.

Report
Poll

Please briefly explain why you feel this question should be reported .

Report Cancel
Protractor.js 25%( 1 voter )
Protractor Ruby 0%
Other 0%

What would you choose and why?

Actually the best options are:
1. Protractor.js
https://github.com/angular/protractor

2. Protractor Ruby
https://github.com/bootstraponline/angular_automation

3. Other
Any other frameworks?

Language doesn't matter – both are good.
Have in mention that Ruby suits testing better than Java. Would you still choose Protractor.js?

in progress 2
Automation 7 Answer 4935 views 3

Answers ( 7 )

  1. Phuoc Nguyen
    0
    August 4, 2015 at 9:52 am

    Please briefly explain why you feel this answer should be reported .

    Report Cancel
    IMHO, I think it depends on which language that you're familiar with, as Protractor JS is written on Javascript, Protractor Ruby is based on Ruby - script language, or others like Cucumber, JBehave, ... , any framework you want and suits for your test suite.
    0
    August 4, 2015 at 2:44 pm

    Please briefly explain why you feel this answer should be reported .

    Report Cancel
    Pure Protractor without additional layers of BDD - Java or Ruby.
    Both languages are familiar for me.
  2. Phuoc Nguyen
    1
    August 4, 2015 at 5:48 pm

    Please briefly explain why you feel this answer should be reported .

    Report Cancel
    @Jakub:
    If that, I suggest use Protractor JS, 3 reasons as I know:
    1- It was born for web application using Angular JS framework, so it supports Angular specific locator. It will save your time/your effort to to setup.
    2- One more thing, because it based on the framework , it will automatically execute the next steps in your test. It means you dont need to add the sleep, or wait method like another framework.
    3- Basically, it uses like Webdriver (JS) so it works as interact like user - browser <-- it's the reasons why we call it as e2e testing.
    Also, I'm fan of BDD :smile: so if you like, try to use Protractor JS and Cucumber. This is the basic reference links about it : http://nicholasjackson.github.io/agile/bdd/angular/protractor/cucumber/protractor-cucumber/

    Hope it helps and happy coding.
  3. Phuoc Nguyen
    1
    August 4, 2015 at 5:49 pm

    Please briefly explain why you feel this answer should be reported .

    Report Cancel
    @Jakub:
    If that, I suggest use Protractor JS, 3 reasons as I know:
    1- It was born for web application using Angular JS framework, so it supports Angular specific locator. It will save your time/your effort to to setup.
    2- One more thing, because it based on the framework , it will automatically execute the next steps in your test. It means you dont need to add the sleep, or wait method like another framework.
    3- Basically, it uses like Webdriver (JS) so it works as interact like user - browser <-- it's the reasons why we call it as e2e testing.
    Also, I'm fan of BDD :smile: so if you like, try to use Protractor JS and Cucumber. This is the basic reference links about it : http://nicholasjackson.github.io/agile/bdd/angular/protractor/cucumber/protractor-cucumber/
    Github link: https://github.com/nicholasjackson/protractor-cucumber-example

    Hope it helps and happy coding.
    4
    August 4, 2015 at 10:09 pm

    Please briefly explain why you feel this answer should be reported .

    Report Cancel
    lol, this is interesting topic, right?. The part of reason I believed in Protractor by Google support. I am fan BDD too :D. So I worked it with Cucumber js , migrated Protractor and Cucumber. It is really cool. My demo in here: https://bitbucket.org/cgnv/protractor. Actually I love Ruby too, but Protractor Ruby, wwooo, so cool, maybe I wanna to investigate :). @PN: How about AngularJs 2.0, the architecture of AngularJs changing dramatically, so Protractor can adopt the changes?.
  4. Phuoc Nguyen
    1
    August 5, 2015 at 5:44 pm

    Please briefly explain why you feel this answer should be reported .

    Report Cancel
    @Chuong:
    It's really tricky question for me :D . Yes, when changing from Angular to Angular JS 2.0, the API change, the method to call change as I know.
    Let's say we have an element like: (just example)

    In your test, will be (I assume :D) :
    element( by.model('commentText') )
    When upgrading 2.0, the attribute "ng-model" will be changed to another then you cannot catch the element.
    IMO, I think it depends on the way you catch the element in code, it might be:
    var cls = SelectById(elementId).GetAttribute("class");
    <-- then when it changed, you can change the attribute also. Beside it, we have "contains" right?

    It's just my think, please correct me if I'm wrong.

    P/s: I see in your framework, you use "Chai" , what's the difference between Chai and another frameworks?
    0
    August 5, 2015 at 10:06 pm

    Please briefly explain why you feel this answer should be reported .

    Report Cancel
    Sorry PN, I made you confused about Chai that is a assertion library in Nodejs, it is likely a rspec in ruby with "expect" object. http://chaijs.com/

    Yep, I totally agree with you about how to catch the element. So I haven't tried it on Angularjs 2.0 yet :D. I just wonder one thing in Javascript, it will be changing very fast. When a beautiful day, developers will propose another JS fw, hix. If we can not have this mindset, may be current framework will be thrown out.

Leave an answer