Unable to find reason for build failure

crio-user@suyash-sreekumar:~/workspace/suyash-sreekumar-ME_QMONEY$ ./gradlew test

Task :qmoney:compileTestJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Task :qmoney:test

com.crio.warmup.stock.portfolio.PortfolioManagerFactoryTest > getPortfolioManagerWithStockQuoteService() FAILED
org.opentest4j.AssertionFailedError at PortfolioManagerFactoryTest.java:27

com.crio.warmup.stock.portfolio.PortfolioManagerTest > calculateExtrapolatedAnnualizedReturn() FAILED
java.lang.IllegalArgumentException at PortfolioManagerTest.java:117

com.crio.warmup.stock.quotes.AlphavantageServiceTest > getStockQuoteSingle() FAILED
java.lang.NullPointerException at AlphavantageServiceTest.java:68

com.crio.warmup.stock.quotes.TiingoServiceTest > getStockQuoteSingle() FAILED
java.lang.IllegalArgumentException at TiingoServiceTest.java:65

com.crio.warmup.stock.quotes.StockQuoteServiceFactoryTest > getServiceAlphavantage() FAILED
org.opentest4j.AssertionFailedError at StockQuoteServiceFactoryTest.java:25

com.crio.warmup.stock.quotes.StockQuoteServiceFactoryTest > getServiceDefault() FAILED
org.opentest4j.AssertionFailedError at StockQuoteServiceFactoryTest.java:31

com.crio.warmup.stock.quotes.StockQuoteServiceFactoryTest > getServiceTiingoUpperCase() FAILED
org.opentest4j.AssertionFailedError at StockQuoteServiceFactoryTest.java:19

com.crio.warmup.stock.quotes.StockQuoteServiceFactoryTest > getServiceTiingo() FAILED
org.opentest4j.AssertionFailedError at StockQuoteServiceFactoryTest.java:13

TEST RESULT: FAILURE
TEST SUMMARY: RAN 21 TESTS, 13 SUCCEEDED, 8 FAILED, 0 SKIPPED

21 tests completed, 8 failed

Task :qmoney:test FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:qmoney:test’.

There were failing tests. See the report at: file:///home/crio-user/workspace/suyash-sreekumar-ME_QMONEY/qmoney/build/reports/tests/test/index.html

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See https://docs.gradle.org/5.2.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1m 26s
5 actionable tasks: 3 executed, 2 up-to-date

This is terminal output after running gradlew test .
Can some one tell me the reason my build is failing.

The 8 test cases are failing because of multiple reasons.

  • PortfolioManagerFactoryTest it is failing because you haven’t completed StockQuoteServiceFactory.java
  • You haven’t completed getStockQuote method in AlphavantageService
    These are some of the things I noticed. Please complete the tasks and follow the todo’s carefully.

Hi @Saurav_Crio.Do ,I am aware I havent done that.
But in milestone 1 it is mentioned that build should be successful.
But that isnt the case.
Can I know the reason

You are running gradlew test so it’s test failure not build.
Run command for build it will give you exact things which u want.

Thanks @deepadeshra.

1 Like