简体   繁体   中英

Selenium-Webdriver- java+TestNg Vs ruby

I have a automation suite in selenium-webdriver ruby::TestUnit. I found that in java, we can have TestNg, which provides many facilities. Is it worthwhile to change all my suite to java+TestNg? or Should I implement them myself in ruby? in particular, I am looking for these features.. data-driven, page object based , comprehensive reports

I highly recommend to try Capybara before you move on to Java:

https://github.com/jnicklas/capybara

Both has its own merits and demerits

Java selenium :help will be available online if you stuck up somewhere more APIs will be available for any integration

Ruby Selenium :less help will be available online ,as users are quite smaller in numbers Ruby gems are limited for any type of integration

Ruby is very simple and easy Language If your project can be rated as medium or Low in terms of complexity ,I would prefer to use Ruby.

You can use Rspec(BDD tool) in place of Test NG (set up annotation, test flow/order, etc). You can also use page-object-gem to categorize each functional page into a class. Page-object-gem for Ruby is far more powerful than the page object model used in Java. This is an API that comes with 3-5 methods (.click, getAttribute, select the radio button, check/uncheck checkbox, etc) when you declare the element using a locator (whereas in Java, the developer has to code all of these methods themselves). I've moved my project from using selenium java to selenium/watir/rspec/page-object-gem, we cut down the lines of code by three folds. The team can accomplish a lot more stories in a sprint comparing before.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM