AngularJs end
Given a site with an existing extensive set of test cases written in Java using Selenium for a site, and this site is being re-written in AngularJs, how does one go about integrating the Selenium tests into the new app?
I have looked into Protractor, the new recommended end-to-end test runner that uses Selenium, however, this appears to suggest writing test in Javascript. This article goes into a little more detail about how to get this set up working, but again, the tests are written in Javascript.
As much as I would like to write the tests in Javascript, I would like to avoid a rewrite, so a means to get the existing ones integrated would be nice. Is there a configuration in Protractor that would enable this to happen?
I am afraid there is no good solution for you here. There are numerous obstacles in your way.
In my opinion your best best are as follows:
If your specs themselves are written in a higher level spec language like Cucumber, then those , in theory at least, can be ported to javascript using cucumber-js and you can simply re-implement the underlying definitions (no small task) on top of protractor.
You could get really ambitious and port protractor to Java if it seems like that is less effort than rewriting your tests in javascript. You would then be at liberty to minimize issue #2 above but I still think #3 would lead you to conclude that porting your tests to javascript has the lower LOE.
链接地址: http://www.djcxy.com/p/50752.html上一篇: Hudson和CruiseControl for Java项目有什么区别?
下一篇: AngularJs结束