Reputation: 1840
I have a bunch of Selenium tests written in Java.
Is there a way to covert them to Protractor tests?
Upvotes: 0
Views: 982
Reputation: 4597
No, you have to write framework and all tests from scratch if you use Protractor and you have to learn lot of new things, below are some points for observation.
javascript
language to write unit/regression/functional
tests, but js syntax is different from java, you can understand its flavor but syntax is completely different. e.g. import
becomes require
.then
. js script control flow is not synchronous
unlike java so understanding it is very important and bit tedious.jasmine allure reports
,jetty reports
etcjasmine
instead of junit/testng..jxl/apache-poi
Suggestions =>
ngWebDriver
=> This is an extension to WebDriver for handling angular based applications and supports writing angular tests using JAVA. This is written by Paul Hamant. You can kick start using link.But consider synchronization is not as good as Protractor,documentation and issue support is limited.Upvotes: 2
Reputation: 3719
Take a look at https://sqa.stackexchange.com/questions/30010/moving-from-selenium-to-protractor. As far as I know there is no trivial way to make this transition.
Taking tests that are written directly in Selenium and transitioning to Protractor is almost like writing them from scratch especially if my assumption is correct that the devs are totally rewriting the front end with angular.
HOWEVER, you do have a test framework and a list of tests which is a good place to start.
Upvotes: 1