Skip to content
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

Unable to see testlogger options in my unit test runs #326

Open
spark85 opened this issue Oct 12, 2023 · 11 comments
Open

Unable to see testlogger options in my unit test runs #326

spark85 opened this issue Oct 12, 2023 · 11 comments
Assignees
Labels

Comments

@spark85
Copy link

spark85 commented Oct 12, 2023

Description
Hello,

I've succesfully setup the project as a dependency using the gradle plugin; and I'm sure of it as I am able to setup a testlogger configuration object in my top-level build.gradle. However I'm not seeing the mocha theme or any other feature doing anything when I run ./gradlew app:test or using Android Sudio 'Run Tests'

I haven't setup anything in my modules. Should I be setting something in the modules?

Versions

  • Test logger version: 3.2.0
  • Gradle version: 8.1.1
  • Java version: Amazon Corretto 17.0.1

Type of test being run

Whether it is JUnit, Spock, TestNg, or anything else. Also, try to include a sample test here.

Test logger configuration

testlogger {
theme = com.adarshr.gradle.testlogger.theme.ThemeType.MOCHA
showExceptions = false
showStackTraces = false
showCauses = false
slowThreshold = 2000
showSummary = false
showSimpleNames = false
showPassed = true
showSkipped = true
showFailed = true
showOnlySlow = false
showStandardStreams = false
showPassedStandardStreams = false
showSkippedStandardStreams = false
showFailedStandardStreams = false
logLevel = org.gradle.api.logging.LogLevel.ERROR
}

Screenshots

Additional information

Add any other information about the problem here.

@radarsh
Copy link
Owner

radarsh commented Oct 12, 2023

Can you try by commenting out the logLevel setting?

@spark85
Copy link
Author

spark85 commented Oct 20, 2023

still having the same problem. Could you add the command line arguments we should be using? is it just gradlew tests?

@radarsh
Copy link
Owner

radarsh commented Oct 20, 2023

You don't need any other argument. Just running the test task should print the logger output. Perhaps create a small reproducible sample so that I could take a look?

@spark85
Copy link
Author

spark85 commented Oct 21, 2023

Sure. So I willl show you the output of the build window from Android Studio & also the terminal output from .gradlew command. We have a complicated gradle build system so it's possible that where I am including the test logger & the logger configuration is getting overridden.

@spark85
Copy link
Author

spark85 commented Oct 23, 2023

I'm actually getting a new issue; or this was the issue before but it wasn't being logged out.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

@spark85
Copy link
Author

spark85 commented Oct 23, 2023

Screenshot 2023-10-23 at 1 05 19 PM

@spark85
Copy link
Author

spark85 commented Oct 30, 2023

Screenshot 2023-10-23 at 1 05 19 PM

Just wanted to check in if this is connected to another issue?

@spark85
Copy link
Author

spark85 commented Oct 30, 2023

Added a video with more information --> https://drive.google.com/file/d/1NYfacrmaasiMIDtyN7oHVlAZbU3nOQgD/view?usp=sharing

@spark85
Copy link
Author

spark85 commented Nov 8, 2023

Hello, just wanted to know if I should expect an update on this issue or I should close it?

@radarsh
Copy link
Owner

radarsh commented Nov 8, 2023

@spark85 I just found some time to work on this project tonight. Let me check your resources and let you know. I also found this StackOverflow question which seems relevant.

Possibly related to #268 and #111

@radarsh
Copy link
Owner

radarsh commented Nov 8, 2023

Sorry but this is beyond me. Partly because I don't do Android development. Perhaps if someone could create a codespace to reproduce this I might be able to help but even so it's unlikely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants