I have a cucumber framework which is catering to API as well as UI feature files. So, I have 2 feature files one for API and the other for UI. Similarly, I have created 2 classes in my step definition folder one for UI and other for API. So the structure is something like below :
featureFiles
--feature file for API
--feature file for UI
stepDefinition
--stepDefAPI
--stepDefUI
TestRunner
--UITestRunner
--APITestRunner
gluecode for both are stepDefinition, however, if I run APITestRunner, it says Test Class not found in specific project. However, when i segregate my stepDefAPI in some other package and only leave stepDefUI in that package then it works correctly. I can infer that it is happening because both the classes are in same package, doesn't cucumber support this kind of structure ?