5

We have an iOS application (written with Obj-C and now starting to incorporate Swift) that we want to write tests for using Appium.

Our test team comprises of people who have little programming experience. However, most of our developers (apart from the iOS devs, obviously) are intimately familiar with Python and are using it in our production environment.

We are not sure which language to pick for writing our tests with, although I, personally, am leaning towards Python.

Is there any specific reason to pick Java over Python?

1
  • I would suggest to use Java as there enough community support available. Also java libraries for Appium is always updated.
    – Naval
    Commented Jul 6, 2018 at 5:22

5 Answers 5

7

Oh Boy! you might start another one of the Java vs Python vs Other language war. These are kind of question which are always answered with preference for a specific language in mind.

For me- I would prefer Python over Java, because of one reason : Its simplicity.

Our test team comprises of people who have little programming experience. However, most of our developers (apart from the iOS devs, obviously) are intimately familiar with Python and are using it in our production environment.

When you say this, I am interpreting that your test team has little programming experience , although it is something which is not alien to them.

I have worked on both Python and Java, implementation of Selenium and Appium, and I've felt that Python is a lot easier to grasp and code with, compared to Java- but this is completely a personal opinion. People may differ from this.

What I've felt is that Python is a lot easier to begin with and for people like your team members would definitely find it easy to learn, as compared to Java (again- a personal opinion).

It is a lot easier to write simple code in Python as compared to Java.

Let me take a simple example- A simple Hello world program

In Python, it would simple be as :

print('Hello World')

Where as in Java, it would be :

public class HelloWorld {
public static void main(String[] args) {
   System.out.println("Hello, world!");
}
}

A Python program is much smaller, simpler and easier to understand than a Java program, which comes in handy when you have a team, which has less or no technical prowess (programming knowledge).

You can refer to Peter Masiar's answer to this question for more reason as to why you should choose Python : I want to learn Selenium but not sure about the language I need to learn for automation

3

Is there any specific reason to pick Java over Python?

Not really. It depends on which language you feel more comfortable with.

However, most of our developers (apart from the iOS devs, obviously) are intimately familiar with Python and are using it in our production environment.

So go with Python. Then Devs can also contribute to e2e Test Automation (faster).

6
  • Beginners usually are not "more comfortable" with any language, this is why they ask for guidance. Python is widely considered as more friendly for beginners. It was designed as language for experts who have other priorities than jumping through hoops to satisfy compiler optimizer. Commented Aug 27, 2015 at 20:28
  • "Python is widely considered as more friendly for beginners." is not the answer to his question. His question is if 'Python' or 'Java' will affect his Appium Automation Tests, which the answer is"Not really". And I can not recommend him any programming language because he already mentioned "..Our test team comprises of people who have little programming experience.". So maybe they are more comfortable with Java.
    – masood ghz
    Commented Aug 29, 2015 at 17:23
  • OP is beginner, and research proved that Python is better for beginners than Java. So you cannot recommend, because you do not have the info and necessary experience. Other people have the info, and CAN make recommendation. Also, Python is already used in OP's prod environment, so it is really a no-brainer. Commented Aug 31, 2015 at 15:38
  • Again, you keep repeating Python is easier than Java which has nothing to do with his question. Read the question first.
    – masood ghz
    Commented Aug 31, 2015 at 17:41
  • I read the question, and I found: (1) OP leans towards Python. (2) OP has support for Python from dev team. Result: There is NO reason to pick Java over Python, except you personally like Java more, most likely because you do not know Python and are just another blub programmer (read the question). So if you insist on holy war, let's take it to the chat. BTW I know java, so I dislike Java from point of knowledge not ignorance. Commented Aug 31, 2015 at 19:44
2

I will go for Python because of it's simplicity. Python code looks readable and can be easily understood and even others who have very limited programming skills can also join in later phase of automation to accomplish voluminous scripting/data addition work if you have put a nice data driven framework.

1

Ok, this is very old, but the answers in here are focusing only in language independently that he said he wanted to use appium.

If your devs had a clear preference, then go with that, if not, then I would say go with java, because the java-client its kept more updated and the community using java is way bigger.

python client: https://github.com/appium/python-client java client: https://github.com/appium/java-client Community forum: https://discuss.appium.io/

0

Some factors have to be considered before choosing a language.

  • The current language being used by the company for development: If an organization has everyone using C#, then that should be the ideal language to use.

  • Introducing a new language isn’t easy better to use a language that QA testers are already comfortable with.

  • Developer support for the programming language should also be considered. suppose if local developers are experienced with a particular language, then that language is a better choice for QA teams as well. In case testers require help with the language, defects, or development tools, it becomes easier to make use of the already available in-house expertise.

  • For individuals who haven’t programmed before, using script-friendly languages like Python, Ruby etc. could be the best way to go.

  • Java is the most commonly used language, but my personal opinion is that scripts can be complex because of the relatively complicated syntax.

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