| || |
Tests in Java (via Selenium WebDriver) / application in PHP -> any impact?
I'm beginning a new test automation project using Selenium WebDriver.
I randomly began using Java. In fact, the application I'm testing is coded in PHP.
Is there any impact? Shall I use another language?
I noticed I could code tests in Java, Ruby, Python and C# but I didn't notice I could do them in PHP...
Thank you in advance,
There are PHP bindings developed by facebook. https://github.com/facebook/php-webdriver
Your Java bindings would work fine as you're just talking to the browser through Webdriver not the underlying code. However, where possible there are some advantages to using the same code base as the developers, most simply that you can rely on them for help.
No, you can use Java just fine.
Originally Posted by decapod
But you may consider using the same language as the developers for the following reasons.
1. Easier to integrate your tests into the build cycle. This makes implementing CI and getting developers to run the automated tests while development.
2. Will give your automation team working knowledge of the platforms and systems of the Software Under Test. This will make it easier for your automation engineers to develop test hooks when needed.
3. More respect. I think there's a certain amount of respect that happens when developers see that you're using the same tools, same language, and same best practices. This is anecdotal, but I feel developers are more comfortable with me refactoring their software under test for testability when I have been developing under the same language for a while than shops that have separate automation and SUT platforms.
I dont think there should be any problem when you are using java - as you are going to interact with browser controls.
But there could be situations where you might need the custom controls build by dev and doing some API testing - where generally they would share their libraries to ease your work. So only in this case, you might face some challenges
Thank you all for your answers. Now I'm confused, because you got me sure it would be great to use PHP as well, but I've had a look at the PHP binding and it seems there's not much documentation :s It's an important criterion, isn't it?
But anyway thank you
For the most part, most of the bindings behave the same way. Java being the core language of the Selenium team has the most documentation.
I think for the basics, you'll find the basic web element interactions will be the same. Some things like items in the Selenium Support package will differ. You may opt to find a support package that's specific for the frameworks/language you're using.