Comments (19)
@sebaslogen Let me post the sample project in stack overflow and we will look for resolution.Please let me know if you can able to fix this in near future
from cleanguitestarchitecture.
In the .feature file inside your features folder, do you have a line starting with "Feature:" and another one starting with "Scenario:" and above this line the tag @login-scenarios like in the sample? https://github.com/sebaslogen/CleanGUITestArchitecture/blob/master/app/src/androidTest/assets/features/login.feature
from cleanguitestarchitecture.
yeah.I have the keywords "Features" & "Scenario" in my login.feature like this:
Feature: Login in the application
@login-scenarios
Scenario: User can login with valid user name and password
Given I see the login page
When I login with user name "admin" and password "admin"
Then I see the welcome page
In regards to the error message, I ran in CMD and got this detailed error message:
INSTRUMENTATION_RESULT: shortMsg=cucumber.runtime.CucumberException
INSTRUMENTATION_RESULT: longMsg=cucumber.runtime.CucumberException: No CucumberOptions
annotation
INSTRUMENTATION_CODE: 0
from cleanguitestarchitecture.
I don't know what is the problem with your project configuration. My suggestion is that you try to run the code in this sample project as it is, once you have that working start copy&pasting code from one project to the other and see if you can make it run.
from cleanguitestarchitecture.
@sebaslogen It is working in the sample project.The only difference I found is that my project is having three flavors say alpha,beta & gamma.Is that "CucumberTestcase.java" need to be copied to each of those flavors folders? If so what will be the package name standards for the flavors?
The problem might be "CucumberTestCase" is not found while running tests for the flavors.
Any suggestions ?
from cleanguitestarchitecture.
Did you follow the advice in the sample code about flavors?
https://github.com/sebaslogen/CleanGUITestArchitecture/blob/master/app/src/androidTest/java/com/neoranga55/cleanguitestarchitecture/test/CucumberTestCase.java#L9
from cleanguitestarchitecture.
Yes @sebaslogen .I did follow as mentioned in the Cucumber Test Case file. I am able to successfully configure for an android app which is not having flavors but I could not able to configure for the enterprise app which is having flavors.I just copy pasted the "androidTest" folder files of the working App to "androidTestFalvor1" folder of enterprise App.But,I am still getting the same error.
"Test running failed: Instrumentation run failed due to 'cucumber.runtime.CucumberException'
Empty Test Suite "
Let me know your thoughts on this.
And if possible,can you share a sample project with flavors having cucumber tests and runners.I could not able to figure out where its going wrong as the project without flavors is working very smooth with your framework.
from cleanguitestarchitecture.
Just share the structure of your test folder with flavors and which file is where. Do you share test cases and test step definitions between flavors? What is the difference between your flavors folders under /flavorX/androidTest ?
from cleanguitestarchitecture.
@sebaslogen I have a created a sample android project with flavors where also I am getting the same error. Please find the path for the repo below:
https://github.com/vsgopinath/AppWithFlavors.git
Let me know if you need further information
from cleanguitestarchitecture.
I see the package name is incorrect in this file: https://github.com/vsgopinath/AppWithFlavors/blob/afcbfc87365182a3fec5baeb09ba2686c7ccfb8d/app/src/androidTestFlavor1/java/com/example/gviswa200/myapplication/flavor1/test/CucumberTestCase.java#L1
It should be com.example.gviswa200.myapplication.flavor1.test
from cleanguitestarchitecture.
I have corrected the package name now and added debug folder for flavor1 and added the AndroidManifest.xml in that folder. Still getting the "Empty test suite error".
from cleanguitestarchitecture.
I tried for a while but unfortunately, I can't figure out why it doesn't work.
All I can tell you is that tests on flavors worked in a previous business project I used to work
from cleanguitestarchitecture.
Okay @sebaslogen. Thank you so much for your valuable time and effort.Can we look for help in stackoverflow?
Do you want to close this issue?
from cleanguitestarchitecture.
It's ok to leave the issue open because it's not fixed and other people might find this information useful.
from cleanguitestarchitecture.
@sebaslogen I tried to configure "CleanGuiTestArchitecture" app with flavors and with AndroidTests.I am getting the same error as well.If its possible,can you try this project (CleanGuiTestArchitecture) with a flavor and configure the Cucumber Test for that flavor?
from cleanguitestarchitecture.
@vsgopinath unfortunately I don't have time to help further.
from cleanguitestarchitecture.
@sebaslogen Thanks so much for your help.I am able to resolve the issue as its due to dependency issues.As you instructed in CucumberTestCase.java file,its working fine with those changes.
Closing this issue.
from cleanguitestarchitecture.
@vsgopinath Accidently stumbled upon this and I know the issue is closed, but have you checked that your testInstrumentationTestRunner in your build.gradle file is correctly set? This type of mistake is most often associated with such this type of error.
@sebaslogen Great article by the way
from cleanguitestarchitecture.
@bohsen My application has flavors which made me difficult to configure since I am very new to Android & Espresso testing.Finally I figured out the correct folders for placing the Cucumber Test Case and the runner class and I changed few of the dependency to the latest which helped me resolve this issue. Yeah as you pointed out,I do face issues due to Instrumentation class and I am able to resolve that also.
As @sebaslogen mentioned in the project,I made changes as per his comments and its really working damn good now 👍
And @sebaslogen I am unable to find the screenshots embedded in the html report.Any suggestions on how to find the screenshots.
from cleanguitestarchitecture.
Related Issues (20)
- Questions : no test were found HOT 2
- Gradle Tasks failed after execution HOT 2
- Run specific feature HOT 1
- Cucumber reports are not generated HOT 7
- Undefined step(s) returned when executing feature file HOT 14
- Exception while taking the screenshot HOT 2
- Running feature seems to fail. HOT 3
- Only works for Android 5.1 HOT 3
- How to run multi step definitions file HOT 6
- Question : Reset app state between scenario HOT 1
- Spoon report and screenshots HOT 3
- Getting error "java.lang.AbstractMethodError at cucumber.runtime.UndefinedStepsTracker" HOT 1
- Unable to find element in a webview using onWebView method after SDK 27 update HOT 1
- Getting pending exception when i run my runner file in cucumber HOT 2
- Issue java.lang.NoSuchMethodError: com.aventstack.extentreports.reporter.ExtentHtmlReporter.loadXMLConfig(Ljava/io/File;)
- Cucumber Tests to be run in JMeter. Getting "Could not initialize class io.cucumber.core.options.PluginOption" HOT 2
- Trace -- java.lang.NoSuchMethodError: io.cucumber.tagexpressions.TagExpressionParser: method 'void <init>()' not found
- JENIKS: GRADLE: TESTNG: CUCUMBER FEATURE File: testrunner is faling on jekins pipeline only HOT 2
- plugin in Cucumber runner class are showing attribute undefined. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cleanguitestarchitecture.