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

Handling case when there are no tests in testable summary #37

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

timbaev
Copy link
Contributor

@timbaev timbaev commented May 27, 2022

When running the command, we would get an error:

java.lang.NullPointerException
	at io.eroshenkoam.xcresults.export.ExportCommand.lambda$runUnsafe$1(ExportCommand.java:120)
	at java.base/java.util.HashMap.forEach(HashMap.java:1339)
	at io.eroshenkoam.xcresults.export.ExportCommand.runUnsafe(ExportCommand.java:115)
	at io.eroshenkoam.xcresults.export.ExportCommand.run(ExportCommand.java:86)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1769)
	at picocli.CommandLine.access$900(CommandLine.java:145)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2141)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2108)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1975)
	at picocli.CommandLine.execute(CommandLine.java:1904)
	at io.eroshenkoam.xcresults.XCResults.main(XCResults.java:13)

After debugging it turned out that there was an empty XCTestCase without tests in the application target, so the export failed.
Added a check for the presence of tests, if they are not, then display a message about it in the log.

Perhaps this partially closes the issue #33

@eroshenkoam eroshenkoam merged commit c03f1b1 into eroshenkoam:master Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants