Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Show logs of executed test cases

Dear Community,

 

im working on TestCases and I wonder how to print out or view logs in the executed TestCase. The problem is that if i run the test case just by executing it, everything works fine. If I run the test case as in "Test Cases" window, select the instance and "run Instance" I sometimes get unexpected errors but I have no output logs to look at it at all.

Even if I create a filelogger with log4j (which will be filled under regular terms if it was not a test case) it stays empty when I run the TestCase. 

 

0683p000009M72F.png

 

The only output I get is:

java.lang.AssertionError: 
Failure=1
tAssert_1:File from reference differs from input

	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.assertTrue(Assert.java:41)
	at dl.test_0_4.db_init_tmap_0_1.db_init_COMPTEST_tMapTest.testDefault(db_init_COMPTEST_tMapTest.java:4262)

But there should be a lot of more outputs to look at. Where are they?

I would expect to see something like:

..
[INFO ]: 2019-08-20 09:10:46.036: dl.init_comptest_0_4.init_tmap_0_1.init_COMPTEST_tMapTest - tLogRow_1 - Printed row count: 10. [DEBUG]: 2019-08-20 09:10:46.036: dl.init_comptest_0_4.init_tmap_0_1.init_COMPTEST_tMapTest - tLogRow_1 - Done. [DEBUG]: 2019-08-20 09:10:46.039: dl.init_comptest_0_4.init_tmap_0_1.init_COMPTEST_tMapTest - tFileOutputDelimited_1 - Written records count: 10 . [DEBUG]: 2019-08-20 09:10:46.039: dl.init_comptest_0_4.init_tmap_0_1.init_COMPTEST_tMapTest - tFileOutputDelimited_1 - Done. [DEBUG]: 2019-08-20 09:10:46.039: dl.init_comptest_0_4.init_tmap_0_1.init_COMPTEST_tMapTest - tFileCompare_1 - Start to work. [DEBUG]: 2019-08-20 09:10:46.040: dl.init_comptest_0_4.init_tmap_0_1.init_COMPTEST_tMapTest - tFileCompare_1 - Parameters:COMPARISON_MODE = TEXT_CMP | FILE = ((String)globalMap.get("tCreateTemporaryFile_1_FILEPATH")) | FILE_REF = context.referenceData | DIFFER_MESSAGE = "[job " + jobName + "] Files differ" | NO_DIFFER_MESSAGE = "[job " + jobName + "] Files are identical" | PRINT = true | ENCODING = "ISO-8859-15" | [job init_COMPTEST_tMap] Files are identical [INFO ]: 2019-08-20 09:10:46.041: dl.init_comptest_0_4.init_tmap_0_1.init_COMPTEST_tMapTest - tFileCompare_1 - Compare result : [job init_COMPTEST_tMap] Files are identical. [DEBUG]: 2019-08-20 09:10:46.041: dl.init_comptest_0_4.init_tmap_0_1.init_COMPTEST_tMapTest - tFileCompare_1 - Done. 122 milliseconds

Do you have any idea where to find the logs?

 

Cheers,

TT

 

Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hello,

Are you able to find your files for test history are created in the path.
[workspace]\[projects]\tests\jobs\_xxxxxxxxxxxxxxxx\history_xxxxxxx_0.1?

Please check lastGenerated.log in [workspace]\.Java

Best regards

Sabrina

Anonymous
Not applicable
Author

I checked those folders and even directed the log4j output to a file which is choose myself. Unfortuantely I did not found anything. When I run regular jobs, everything is logging correctly though.

Anonymous
Not applicable
Author

Hello,

Make sure you are using JDK instead of JRE and the workspace path is not too long.

Best regards

Sabrina