Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spring boot starter #2

Draft
wants to merge 24 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
*.iml
site/
**/target
pom.xml.versionsBackup
pom.xml.versionsBackup
dependency-reduced-pom.xml
54 changes: 26 additions & 28 deletions buggy-core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

Expand All @@ -21,6 +21,16 @@
</properties>

<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.2.9.RELEASE</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.27</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
Expand All @@ -29,38 +39,14 @@
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
</dependency>
<dependency>
<groupId>org.atteo.classindex</groupId>
<artifactId>classindex</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jul</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<!-- Utils -->
<dependency>
Expand All @@ -71,6 +57,18 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>5.2.9.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.2.9.RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,54 +14,43 @@
* limitations under the License.
*/

package org.touchbit.buggy.core.test;
package org.touchbit.buggy.core;

import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.touchbit.buggy.core.Buggy;
import org.touchbit.buggy.core.testng.listeners.BuggyExecutionListener;
import org.touchbit.buggy.core.testng.listeners.IntellijIdeaTestNgPluginListener;
import org.touchbit.buggy.core.utils.log.BuggyLog;
import org.testng.annotations.Listeners;
import org.touchbit.buggy.core.logback.SiftingTestLogger;
import org.touchbit.buggy.core.testng.BuggyExecutionListener;
import org.touchbit.buggy.core.testng.IntellijIdeaTestNgPluginListener;

/**
* Base class for tests.
* <p>
* Created by Oleg Shaburov on 17.05.2018
* [email protected]
*/
public abstract class BaseBuggyTest implements TestRailTest {
@Listeners(IntellijIdeaTestNgPluginListener.class)
public abstract class BaseBuggyTest {

protected static Logger log = BuggyLog.test();
protected static SiftingTestLogger log = new SiftingTestLogger();

protected BaseBuggyTest() {
this(null);
}
protected BaseBuggyTest() { }

protected BaseBuggyTest(final Logger logger) {
if (!IntellijIdeaTestNgPluginListener.isIntellijIdeaTestRun() && !Buggy.isTestRun()) {
Buggy.getExitHandler().exitRun(1, "Missing IntellijIdeaPluginListener in the Intellij IDEA" +
" TestNG plugin configuration.");
}
protected <L extends SiftingTestLogger> BaseBuggyTest(final L logger) {
setLog(logger);
setRunId();
}

/**
* Method for the separation of steps in the test log.
*/
protected static void step(@NotNull final String msg, @NotNull final Object... args) {
BuggyExecutionListener.step(log, msg, args);
log.step(msg, args);
}

protected static void setLog(final Logger logger) {
protected static <L extends SiftingTestLogger> void setLog(final L logger) {
if (logger != null) {
log = logger;
}
}

@Override
public long getRunId() {
return 0;
}

}
Loading