π Getting Started with Core
1) Add the dependencyβ
Maven (Parent POM β turnkey)
<parent>
<groupId>io.github.toobprojects</groupId>
<artifactId>qabase-framework</artifactId>
<version>2.2.0</version>
</parent>
<dependencies>
<dependency>
<groupId>io.github.toobprojects</groupId>
<artifactId>qabase-core</artifactId>
</dependency>
</dependencies>
Maven (BOM β flexible)
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.toobprojects</groupId>
<artifactId>qabase-framework</artifactId>
<version>2.2.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.toobprojects</groupId>
<artifactId>qabase-core</artifactId>
</dependency>
</dependencies>
Maven (individual)
<dependency>
<groupId>io.github.toobprojects</groupId>
<artifactId>qabase-core</artifactId>
<version>2.2.0</version>
</dependency>
Gradle (Kotlin DSL)
// Parent-like setup isn't native in Gradle; use the BOM for versions
dependencies {
testImplementation(platform("io.github.toobprojects:qabase-framework:2.2.0"))
testImplementation("io.github.toobprojects:qabase-core")
}
If you donβt use the Parent POM, remember to configure:
maven-surefire-plugin(unit tests)maven-failsafe-plugin(if you have ITs)io.qameta.allure:allure-maven(reporting)
2) Minimal testβ
import com.toob.qabase.QaBaseTest
import org.junit.jupiter.api.Test
import com.toob.qabase.core.AllureExtensions.step
import com.toob.qabase.core.AllureExtensions.attachText
@QaBaseTest
class SmokeTest {
@Test
fun works() {
step("Do something meaningful") {
attachText("note", "QA Base Core is wired β
")
}
}
}
Run with Allure
mvn -q -Dallure.reports=true test
# OR
mvn -q clean verify -Pallure-reports
# And finally server the report:
mvn allure:serve