-
Notifications
You must be signed in to change notification settings - Fork 11
Logging
mpfotenhauer edited this page Dec 5, 2017
·
13 revisions
We added logging support via Simple Logging Facade for Java (SLF4J). Doing so everybody is able to configure a logging framework.
In the Neodymium-example we demonstrate how to use Apache Log4j 2 as a logging framework.
-
Add a Logger of your choice to your
pom.xml
<dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-slf4j-impl</artifactId> <version>2.10.0</version> <scope>test</scope> </dependency>
If you don't want to use logging and don't want to be bothered about it on the console you can add a no operation implementation of the logger.
<dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-nop</artifactId> <version>1.7.25</version> <scope>test</scope> </dependency>
-
Add a configuration
- Log4j 2 requires a configuration this can be done in various ways.
- We added a demo config
src/test/resources/log4j2.properties
. - Pitfall: Make sure that the
properties.projectPath
within the properties file is matching you project structure.
Overview
Neodymium features
- Neodymium configuration properties
- Neodymium context
- Utility classes
- Test data provider
- Test Environments
- Multi browser support
- Applitools Plugin
- Localization
- Highlight and Wait
- Advanced Screenshots
- Seperate Browser Sessions for Setup and Cleanup
Best practices and used frameworks
Special