-1

I started in the world of QA about 1 year ago and I started as a QA tester. But for almost 6 months ago, I started with the automation testings. I started with selenium and behat. In my company they were so enthusiastic with the idea of using behat because it works with php. However, as far as I can see most of the documentation found in internet and in forums, most of the automation testers work with Java or Python. So, the question is: shall I start programming with whether java or python? or Shall I continue with Behat? and between java and python, which is the best for automation? Fact: I was using behat as well because most of the developers have more facility on using php lenguage instead of Java.

This question started because I'm trying to do some automated mobile devices tests and trying to find behat documentation is really hard.

  • 1
    Voting to close this question as to broad and too opinionated. – Niels van Reijmersdal Oct 20 '17 at 21:41
1

Behat is an implementation of the Gherkin syntax for PHP. Each language has its own implementation.

So you can use the concepts of Behat with each other language you learn in the future.

https://cucumber.io/ now has bindings for most languages nowadays, Also PHP.

Now for programming languages this is very oppionated, but my favorite is JavaScript as it is the language of the web. Everyone is forced to use it and it’s a really interesting and growing language. Also it supports most programming paradigms :)

For mobile testing have a look at http://appium.io , as it is THE mobile testing framework of this moment. Looks like Selenium, uses JavaScript. You should be able to combine it with CucumberJS.

| improve this answer | |
0

Python is a great first language and very easy to learn but for automation I'd go with Java. It's still easy enough to learn and there's plenty of tutorials online to help. There's so much more documentation out there for Java for Selenium/Appium I've found.

But if really comes back to what you feel more comfortable with, do some quick intros to both and see which you prefer. Usually I'd say lean towards what your developers know better but if they don't go much past PHP then not too helpful.

| improve this answer | |
0

Python is widely considered best first language for beginners.

One of the reason is it's killer feature: interactive python, which allows you to learn the language one line at a time.

https://www.hashcollision.org/hkn/python/idle_intro/

Also, Python is object-oriented but not object-obsessed like Java is. For beginners, simple procedural programming, or simple data literals which Python provides are much easier to understand than Java's.

Third strike is reading/writing to files.

In Python, reading is as simple as for line in open(filename):.

In Java you have few dozens of types of files to comprehend.

Bonus strike: Python debugger pdb.

In any place your code is in troubles, you can import pdb;pdb.set_trace() and you get python debugger which allows you to inspect objects exactly as they are (not as you think they should be). This feature alone saves me few hours every week.

Disclosure: I programmed in many languages starting with Algol 60, including PL/1, Forth, Prolog, Perl, Java, C# and Python. After Python, I could not return to working full time in C# (which is close to Java) because I am at least 3 times more productive in Python. It was just too much pain to do myself in C# what Python does for me.

There are many similar questions in this forum, learn to use search and Google. Your question will be likely closed soon.

Python is especially good for browser automation (better than Java), because Java is optimized for efficient code (makes programmer to explicitly express many things which Python does for you). Python is optimized for efficient use of programmer's time (making coding efforts more productive).

Efficiency of the executed code is almost irrelevant in testing website, because most of the time is spent on webpages loads/processing. If 90% of the time is outside of your control, even if you cut remaining 10% to zero (which you cannot), you will save only 10% of the total time.

| improve this answer | |
  • And what do you think about Behat? – Ibrian93 Oct 20 '17 at 15:42
  • 1
    Google says it is a testing framework for PHP. PHP is programming language broken in so many ways that even it's proponents agree it is broken. It is easy to start writing web pages in PHP (so is often used by beginners), but web is overfilled by examples of code of questionable quality written by clueless beginners, so it is hard to learn to use PHP correctly. Python, on the other side, has excellent community and resources for all levels of expertise, from beginner to expert. – Peter M. - stands for Monica Oct 20 '17 at 15:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.