Code Monkey home page Code Monkey logo

Comments (19)

vsgopinath avatar vsgopinath commented on June 2, 2024 2

@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.

sebaslogen avatar sebaslogen commented on June 2, 2024

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.

vsgopinath avatar vsgopinath commented on June 2, 2024

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.

sebaslogen avatar sebaslogen commented on June 2, 2024

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.

vsgopinath avatar vsgopinath commented on June 2, 2024

@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.

sebaslogen avatar sebaslogen commented on June 2, 2024

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.

vsgopinath avatar vsgopinath commented on June 2, 2024

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.

sebaslogen avatar sebaslogen commented on June 2, 2024

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.

vsgopinath avatar vsgopinath commented on June 2, 2024

@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.

sebaslogen avatar sebaslogen commented on June 2, 2024

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.

vsgopinath avatar vsgopinath commented on June 2, 2024

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.

sebaslogen avatar sebaslogen commented on June 2, 2024

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.

vsgopinath avatar vsgopinath commented on June 2, 2024

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.

sebaslogen avatar sebaslogen commented on June 2, 2024

It's ok to leave the issue open because it's not fixed and other people might find this information useful.

from cleanguitestarchitecture.

vsgopinath avatar vsgopinath commented on June 2, 2024

@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.

sebaslogen avatar sebaslogen commented on June 2, 2024

@vsgopinath unfortunately I don't have time to help further.

from cleanguitestarchitecture.

vsgopinath avatar vsgopinath commented on June 2, 2024

@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.

bohsen avatar bohsen commented on June 2, 2024

@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.

vsgopinath avatar vsgopinath commented on June 2, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.