Good afternoon. Is it possible to implement the work of QAF with JUnit? For example, i want to use qaf-gherkin in my project, but it's build on JUnit + Cucumber. As I see, there is a similar question, but there is no description about project and on which test framework it was based.
Asked
Active
Viewed 380 times
1 Answers
2
QAF built upon TestNG. If you are using Junit for Java you can run using TestNG by setting junit="true"
in configuration file. However for migrating cucumber to QAF it should not impact current runner is either Junit or TestNG until you are using any specific features of Junit. All you need to start using QAF following documentation. You don't need to write or use additional java class to run your tests because it is taken care by QAF. All you need to do is create xml configuration file for to run your BDD
Because QAF provides all testing needs together you don't need to relay on multiple frameworks (junit and cucumber in your case).

user861594
- 5,733
- 3
- 29
- 45
-
Thanks. Also, can you recommend more frameworks with the ability to define custom dataproviders as cucumber examples? As i checked google, there are only qaf and noraui – SuperMario Jan 17 '19 at 23:02
-
1I am not sure about other frameworks but i know that qaf is used in many organizations as that enterprise standard for web, mobile, webservice testing and test written in java, bdd or keyword driven way employing different design concepts like databean, custom component, teststep, testpage, locator repository etc – user861594 Jan 18 '19 at 22:23
-
Thanks. Back to main question: during the migration to the qaf-gherkin we indicate the class in testng xml that works with the cucumber (
) But how to specify a class in which Before/After methods are stored? If you set it in the testng "class" config, then the tests will be executed two times, and in one case, feature files will not be found, and the other will not work Before/After methods – SuperMario Jan 21 '19 at 09:16 -
You need to use testng before and after annotations. Add that class in addition to factory. May be you can ask separate question explaining problem. – user861594 Jan 21 '19 at 16:36
-
With latest [qaf-cucumber](https://github.com/qmetry/qaf-cucumber) you can use qaf with junit+cucumber – user11353541 Nov 23 '19 at 17:28