-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JUnit4 Reporter for Instrumentation Tests – Possible? #157
Comments
Hi there! I'm not sure if our reporter will work with a custom runner.
Here are some options you might want to explore:
|
Hey @gibiw, thanks for the quick reply! I will continue investigating those tomorrow based on your observations, thanks so much for that. I just had a couple of notes/quick follow up questions to guide my next steps:
|
@brunnoferreira I cannot give you a definitive answer to your question about the custom runner. To understand how it works, I would need to review the code. Could you provide more details? For example, a test project. |
I started setting up a sample project but realised I couldn't even get Unit Tests to be uploaded on Android, so maybe let's start with that so I can figure out what is wrong? I have attached a test project here, hopefully it is straightforward. I added a qase.config.json and modified my build.gradle.kts file accordingly. I have based the setup on the instructions linked previously and the example Gradle JUnit4 project here: https://github.com/qase-tms/qase-java/tree/main/examples/junit4/junit4-gradle. Settings should be the equivalent of what we have in the example project – except using the Kotlin DSL – minus the Java part. When updating the config json file in the example with an API Token and a project code I see test runs uploaded to Qase, but when doing the same in the test project attached here, nothing happens. |
Hi there!
I have been trying to set up a project to report test results directly to Qase, but can't seem to make it work. We are running integration tests using a custom AndroidJUnitRunner (so JUnit4) with a mix of Espresso and Compose tests.
The guide I have been using is the one for the JUnit4 Reporter here: https://github.com/qase-tms/qase-java/tree/main/qase-junit4-reporter. More specifically, the Gradle parts of it.
These being instrumentation tests, though, there are a couple of details on that guide that don't quite fit.
Task type is not
Test
, but ratherDeviceProviderInstrumentTest
, wheresystemProperties
is not available. That means this line does not apply:test { systemProperties = System.properties }
Running on a device/emulator, there's no JVM to be configured. This also makes it impossible to complete the aspectjweaver setup:
test.doFirst { useJUnit() def weaver = configurations.aspectjweaver.find { it.name.contains("aspectjweaver") } jvmArgs += "-javaagent:$weaver" }
Is there anything that can be done about those? Is the reporter even supported for instrumentation tests or is there a different guide that I should be following instead?
I have also been trying to debug my implementation so far, but haven't been able to. I saw suggestions to set the debugging mode on the
QaseClient
(like in #106 (comment)), but the guide I'm following doesn't make use of that dependency so I don't have it available at all in my project.Thanks in advance for any help!
The text was updated successfully, but these errors were encountered: