Module 1 Setup 2

String functionNameFromTestFileInStackTrace ;
String lineNumberFromTestFileInStackTrace ;

From where we have to get the values for these arguments and what is this stack trace ?.

You will get the hint from the second TODO in the

1 Like

Do we have to include the garbage number received for the Object Mapper .But they are changing everytime I am finding their values.

Yes include the garbage value.

1 Like

Does the stack trace means call stack panel in debug window?

Yes I took it from there only. It worked for me.

1 Like

When I run ./gradlew test --tests PortfolioManagerApplicationTest.testDebugValues .It shows build suucessful but when I try to submit the module for assesment it shows 2 test case failure and these are due to this .What can be the reason for it?

try building using ‘./gradlew build’ and see if it is successful.

1 Like

These both shows succesful on execution.

Try interpreting unitTesting.log. You will get to know where your test is failing.

1 Like

2020-02-23 07:19:54,123 unitTesting INFO Running gradle test
2020-02-23 07:20:14,285 unitTesting INFO Gradle test run complete
2020-02-23 07:20:14,313 unitTesting INFO Build failed

The unitTesting.log file shows this.

Your build is failing. Try ‘./gradlew build’ to see for errors.

It gives a build succes but still the assesment is failing

What is the content of unitTesting this time ?

Still same build failed

Are you getting the expected output using './gradlew run --args=“trades.json” ’
If yes, check again for all the variable values.
Try again after resetting the workspace.

I am getting correct output after running './gradlew run --args=“trades.json

What’s your output. Match it with expected output.

Only 2 test cases are getting failure which are mainreadfile and mainreadfileedggecase.

Refer This