The possible reason is, the runner you are using converts it into testng data driven test with single test with scenarios from each feature file supplied through data-provider. This is not a right approach. However, in testng there is separate property to set thread count for data driven test. You can set data-provider-thread-count
in xml configuration file at suite lever or can pass command-line argument -dataproviderthreadcount
to specify number of threads.
Better approach
You can look into another library qaf-cucumber with native testng implementation. It is considering each scenario as testng test method gives more control and utilization of each feature of testng. With this library, only scenario with examples are converted as testng data driven test.
You don't need to have additional class to run test. Just use factory available class to have different configuration combinations. Here is sample configuration file:
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="QAF Demo" verbose="1">
<test name="Web-Suite" enabled="true">
<classes>
<class name="com.qmetry.qaf.automation.cucumber.runner.CucumberScenarioFactory" />
</classes>
</test>
</suite>
Note: As of today qaf-cucumber supports cucumber 5.x