I'm currently part of a team working on a Hadoop application, parts of which will use Spark, and parts of which will use Java or Python (for instance, we can't use Sqoop or any other ingest tools included with Hadoop and will be implementing our own version of this). I'm just a data scientist so I'm really only familiar with the Spark portion, so apologies for the lack of detail or if this question just sucks in general - I just know that the engineering team needs both Java and Python support. I have been asked to look into using Cucumber (or any other BDD framework) for acceptance testing our app front to back once we're further along. I can't find any blogs, codebases, or other references where cucumber is being used in a polyglot app, and barely any where Hadoop is being used. Would it be possible to test our app using Cucumber or any other existing BDD framework? We already plan to do unit and integration testing via JUnit/PyUnit/etc as well.
3 Answers
The answer is yes, if you are using one language to test two.
Cucumber-JS can be used to test Javascript and PHP - or at least the outcomes of those scripts on the webpage.
If you mean using in two different Cucumber variants in one feature file set, I would not recommend it.
If needed, I would create two different suites, in Java and in Python, to test the scripts in the language that is needed. However, if you're only using the cucumber framework to test graphical user interfaces, why have two languages powering it?
This is where you need to get the ideas from those who will be using it, on what language they are most familiar with out of Python and Java, and find the right software to integrate it with. For web-based, Selenium is used the most, but for desktop applications, I do not know (as I have only worked with cucumber on web-based applications).
If you need to run a Python script for setup purposes, you can do this from Java. You can also run Java from Python
Basically, choose the langauge that most suites your needs - there are strengths to both (Cucumber JVM is better supported than Python + Lettuce or Jython, by the way).

- 1
- 1

- 2,947
- 1
- 15
- 35
The feature files would be written using Gherkin. Gherkin looks the same if you are using Java or Python. So in theory, you are able to execute the same specifications from both Java end Python. This would, however, not make any sense. It would just be a way to implement the same behaviour in two different languages and therefore two different places. The only result would be duplication and miserable developers.
What you can do is to use BDD and Gherkin to drive the implementation. But different behaviour in different languages. This will lead you to use two different sets of features. That is possible and probably a good idea given the context you describe.

- 4,098
- 3
- 18
- 25
To use cucumber to test desktop applications you can use specflow which uses a framework in visual studio called teststack.white. Just google on cucumber specflow, teststack.white, etc and you should be able to get on track

- 1