-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests_jacoco_lcf.xml
85 lines (63 loc) · 3.29 KB
/
tests_jacoco_lcf.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0" encoding="UTF-8"?>
<!-- tests_lcf.xml
This file should replicate tests_lcf.xml
although with Logging at Debug level to increase unit test coverage.
This configures three appenders: J, R and A.
J and R are used routinely; A is for debugging use.
The R appender writes all logging output to the tests.log file.
This includes messages that the tests have intentionally suppressed,
so it's quite verbose.
The J appender is a JMRI-specific one, configured so that JMRI tests
can examine their output. Changing the levels or
format of J can result in obscure test failures.
The A appender, if used, is configured to send output to stderr.
This is typically used when debugging to make it easier to
see the output during running.
The level can be set in the ThresholdFilter line below.
All three appenders use PatternLayout to control their output format.
Note that the default output formats are not the same across the three appenders.
The default level for test logging is WARN
All the specific class loggers are initially set to ignore everything below that.
You can set a specific class to e.g. debug so that it does log its
information instead of ignoring it, see examples at the bottom.
Then the logging level on each appender (see below) is used to decide if
the data is actually logged.
-->
<Configuration status="DEBUG" name="JUnitTestsConfig">
<Appenders>
<Console name="A" target="SYSTEM_ERR">
<PatternLayout pattern="%d{ss,SSS} [%t] %-5p %c{2}.%M() - %m%n"/>
<ThresholdFilter level="DEBUG"/>
</Console>
<File name="R" fileName="tests.log" append="false">
<PatternLayout pattern="%d{ss,SSS} [%t] %-5p %c{2}.%M() - %m%n"/>
</File>
<!-- JUnitAppender is a custom appender via Log4j2 plugin, see
https://github.com/JMRI/JMRI/blob/master/java/test/jmri/util/JUnitAppender.java -->
<JUnitAppender name="J">
<PatternLayout pattern="%-5p - %m [%t] %c{4}.%M()%n"/>
<ThresholdFilter level="DEBUG"/>
</JUnitAppender>
</Appenders>
<Loggers>
<Root level="DEBUG">
<!-- <AppenderRef ref="A"/> -->
<AppenderRef ref="R"/>
<AppenderRef ref="J"/>
</Root>
<!-- Valid Level names are OFF, FATAL, ERROR, WARN, INFO, DEBUG and TRACE. -->
<!-- Turning off logging for Java Xerces; emits WARNING messages during routine use -->
<Logger name="org.jdom2.transform" level="OFF"/>
<!-- Turning off logging for Java JMDNS; logs SEVERE and WARNING to j.u.l too routinely -->
<Logger name="com.strangeberry" level="OFF"/>
<Logger name="javax.jmdns" level="OFF"/>
<!-- Turning off logging for the WebDriver Manager -->
<Logger name="io.github.bonigarcia.wdm" level="OFF"/>
<!-- Turn off logging for the JUnit 5 discovery process. -->
<Logger name="org.junit.vintage.engine.discovery" level="ERROR"/>
<!-- ################################################################### -->
<!-- # Settings needed for specific tests (last so not accidentally overridden) -->
<!-- # These tests are run at Debug Level for test unit coverage. # -->
<!-- # ################################################################### -->
</Loggers>
</Configuration>