The product I am testing is mostly written in Java. I have to write autonomous code to compare the two outputs(one developed by our dev teams and other by me). Is it good idea to write my code as well in Java, or shall I choose some other language to write my code. Please help me with pros and cons of using same language over using different language.

Also would writing test code in same language as the application code, increase the probability of committing same bug that developer might have made ? And using different language would decrease this probability

  • Are you a developer fluent in Java? Or are you solely a tester fluent in some other tool? Commented Feb 23, 2016 at 15:06
  • I know only Java, so I prefer writing the code in java, but if it makes sense to write code in other language, I am open for others.
    – him
    Commented Feb 23, 2016 at 15:14
  • Guess I misread your question, why do you want to implement the same code twice? Can't you just write testcode to verify the output, maybe give a bit more context why you choose this path. Commented Feb 24, 2016 at 11:52
  • It sounds as if you are describing two decisions: what language to use for your autonomous code (the code that produces the same output as the dev team code), and what language to use for your test (the code that compares the outputs).
    – user246
    Commented Feb 24, 2016 at 12:51
  • Here I want to write autonomous code that should generate a comparable output with dev team code. Agenda here is to generate the outputs of two codes. Once that is done I can compare and quickly identify the issues since it not possible to manually compute the output. This question is only related to write a parallel code(somebody would term it as test code) to dev teams code.
    – him
    Commented Feb 25, 2016 at 5:41

3 Answers 3


Preferable use the same language as Dev-team is using. I would try to prevent the development team to learn to many different languages.


  • Easier for other to help testers
  • Easier for others to maintain tools testers develop
  • Less context switching for people working on or using this tool, this is a big issue, even for the tester. I have worked in a team where I needed to work in 5 languages due to different tooling build by different people...not very handy.


  • For specific platforms or automation tools its hard to find a wrapper for the language used by the Dev-team.
  • Tooling might have poor documentation for some languages (for example Selenium has most examples in Java, but if you team uses PHP you might want to drive Selenium with PHP)
  • Testers might need to learn the language of the Dev-Team, while they already have experience with tooling in another language
  • Thanks for answer, But would writing test code in same language as the application code, increase the probability of committing same bug that developer might have made ? And using different language would decrease this probability.
    – him
    Commented Feb 23, 2016 at 14:49
  • @him: you should add this clarification to original question. Commented Feb 23, 2016 at 14:52
  • 1
    @him I guess so, but using another language might lead to another language specific bug you introduce in your code. I don't think one is better than the other. Also keep in mind how long the code needs to be maintained Commented Feb 24, 2016 at 11:53

Using the same language leverages existing skills and libraries, so in most cases it makes sense.

There are cases when it does not make sense, however. I know about a project which uses C++ for performance reasons. Because tests are not performance sensitive, and flexibility and programmer's productivity is more important than short execution time, they write tests in dynamically typed scripting language, Ruby. And they are sorry they underestimated Python, which would be even more readable for C++ programmers, and has Cython for easier interface with C++.


I think, you should not choose automation tool based on programming language used in development. you should be doing this only if you are planning to involve your developers in automation process.

Following 2 important points should be considered while choosing automation tool this many resolve your query.

  1. You should try to figure out which automation tool will be good for automating your application regardless the language used by tool.
  2. If you have more than 1 automation tool which fulfills your automation needs, then try to select the tool that your team can adopt.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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