-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add log4j base config, FIX: TC for login user
- Loading branch information
1 parent
4532d12
commit c373cf0
Showing
6 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
src/main/java/applications/github/api/user_module/services/UserService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
package config.github.api; | ||
|
||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import org.json.JSONObject; | ||
import org.testng.ITestContext; | ||
import org.testng.annotations.*; | ||
import utilities.jsonUtils.JsonUtils; | ||
|
||
import static utilities.requestsUtils.PropertiesUtil.loadProperties; | ||
|
||
public class Config { | ||
private static final Logger _logger = LogManager.getLogger(Config.class); | ||
|
||
@BeforeSuite | ||
@Parameters("config-File-Path") | ||
public void setup(String configFilePath) { | ||
System.setProperty("base_url",loadProperties(configFilePath).getProperty("baseURL")); | ||
public void setup(String configFilePath, ITestContext context) { | ||
System.setProperty("base_url", loadProperties(configFilePath).getProperty("baseURL")); | ||
_logger.info("Server baseURL: " + System.getProperty("base_url")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,5 @@ | |
<classes> | ||
<class name="applications.github.api.user.TC_PatchUserInfo"/> | ||
</classes> | ||
|
||
</test> | ||
</suite> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Configuration status="INFO"> | ||
<Appenders> | ||
<Console name="ConsoleAppender" target="SYSTEM_OUT"> | ||
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> | ||
</Console> | ||
<File name="FileAppender" fileName="application-${date:yyyyMMdd}.log" immediateFlush="false" append="true"> | ||
<PatternLayout pattern="%d{yyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/> | ||
</File> | ||
</Appenders> | ||
<Loggers> | ||
<Root level="debug"> | ||
<AppenderRef ref="ConsoleAppender" /> | ||
<AppenderRef ref="FileAppender"/> | ||
</Root> | ||
</Loggers> | ||
</Configuration> |