testfly
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>io.github.hakanngul</groupId>
<artifactId>testfly</artifactId>
<version>1.0.4</version>
</dependency><?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"
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>
<groupId>io.github.hakanngul</groupId>
<artifactId>testfly</artifactId>
<version>1.0.4</version>
<packaging>jar</packaging>
<name>TestFly</name>
<description>Java Test Automation SDK for scalable web, API, mobile, and AI/MCP-powered test automation</description>
<url>https://hakanngul.github.io/TestFly/</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>hakanngul</id>
<name>Hakan Gül</name>
<email>hakanngul@icloud.com</email>
<url>https://github.com/hakanngul</url>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/hakanngul/TestFly.git</connection>
<developerConnection>scm:git:ssh://github.com/hakanngul/TestFly.git</developerConnection>
<url>https://github.com/hakanngul/TestFly/tree/main</url>
</scm>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.48.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.9.0</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.21.0</version>
</dependency>
<!--
Cucumber integration — optional so it is NOT pulled transitively for TestNG-only users.
Consumers who use Cucumber must add both cucumber-java and cucumber-testng
to their own project with a matching version.
-->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>7.20.1</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-testng</artifactId>
<version>7.20.1</version>
<optional>true</optional>
</dependency>
<!--
JUnit 5 support — optional so it is NOT pulled transitively for TestNG users.
Consumers who use JUnit 5 must add junit-jupiter and junit-platform-launcher
to their own project.
-->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.10.2</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.10.2</version>
<optional>true</optional>
</dependency>
<!-- JUnit 5 engine — needed to run JUnit 5 example tests locally; not exposed transitively. -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<!--
JSON Schema validation — used by ApiResponse.assertSchema().
Optional so consumers who don't do API testing don't pull it in.
-->
<dependency>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator</artifactId>
<version>1.4.3</version>
<optional>true</optional>
</dependency>
<!--
IMAP email provider — optional so it is NOT pulled transitively.
Consumers who use provider: imap must add this to their own project.
-->
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>2.0.1</version>
<optional>true</optional>
</dependency>
<!--
Apache POI — optional; only needed for @TestData(source = "excel:...").
Consumers who use Excel test-data sources must add poi-ooxml to their own project.
-->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.2.5</version>
<optional>true</optional>
</dependency>
<!--
ReportPortal TestNG agent — optional so it is NOT pulled transitively.
Consumers who enable reporting.reportportal must add agent-java-testng
to their own project, or use testfly with this optional dependency included.
-->
<dependency>
<groupId>com.epam.reportportal</groupId>
<artifactId>agent-java-testng</artifactId>
<version>5.6.8</version>
<optional>true</optional>
</dependency>
<!--
ReportPortal Cucumber 7 agent — optional; reports Given/When/Then steps
as nested items in ReportPortal (Feature > Scenario > Step).
Auto-registered by BaseCucumberTest when present on the classpath and
reporting.reportportal.enabled=true in testfly.yml.
-->
<dependency>
<groupId>com.epam.reportportal</groupId>
<artifactId>agent-java-cucumber7</artifactId>
<version>5.4.10</version>
<optional>true</optional>
</dependency>
<!--
ReportPortal JUnit 5 agent — optional; pushes JUnit 5 test results to
ReportPortal when reporting.reportportal.enabled=true in testfly.yml.
Registered programmatically by TestFlyExtension (replay pattern, same
as the TestNG agent in SuiteExecutionListener).
-->
<dependency>
<groupId>com.epam.reportportal</groupId>
<artifactId>agent-java-junit5</artifactId>
<version>5.3.1</version>
<optional>true</optional>
</dependency>
<!--
Guice is required by TestNG's SuiteRunner at runtime when listeners are
registered programmatically (e.g. ReportPortal). TestNG declares it optional,
so it is not pulled transitively; we include it here so TestFly's own tests
and ReportPortal-enabled consumers have it on the classpath.
-->
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>5.1.0</version>
<optional>true</optional>
</dependency>
<!-- Pure-Java MP4 video encoder (Playwright-style Web UI video recording) -->
<dependency>
<groupId>org.jcodec</groupId>
<artifactId>jcodec</artifactId>
<version>0.2.5</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jcodec</groupId>
<artifactId>jcodec-javase</artifactId>
<version>0.2.5</version>
<optional>true</optional>
</dependency>
<!-- Unit-test tooling (test scope only) -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.2.224</version>
<scope>test</scope>
</dependency>
<!--
SLF4J API — used by StepLogger and framework internals.
TestNG 7.9.0 declares slf4j-api 1.7.36; we override to 2.0.x because
logback-classic 1.5.x / ReportPortal logback appender require SLF4J 2.x.
SLF4J 2.0 is backward-compatible with 1.7 callers, so TestNG remains happy.
-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.16</version>
</dependency>
<!--
ReportPortal logging stack for TestFly's own tests.
These are test-scope only so consumers can choose their own SLF4J binding.
ReportPortal TestNG agent captures test structure; logback + logger-java-logback
sends application logs to the active RP launch.
-->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.epam.reportportal</groupId>
<artifactId>logger-java-logback</artifactId>
<version>5.3.0</version>
<scope>test</scope>
</dependency>
<!-- Source: https://mvnrepository.com/artifact/net.bytebuddy/byte-buddy-agent -->
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<version>1.18.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<release>17</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-testng</artifactId>
<version>3.2.5</version>
</dependency>
</dependencies>
<configuration>
<argLine>-Dnet.bytebuddy.experimental=true</argLine>
<!-- Paralellik için ekle -->
<parallel>methods</parallel>
<threadCount>4</threadCount>
<perCoreThreadCount>true</perCoreThreadCount>
<excludedGroups>demo,integration</excludedGroups>
<excludes>
<exclude>**/examples/**/*.java</exclude>
<exclude>**/integration/**/*.java</exclude>
<exclude>**/*IntegrationTest.java</exclude>
</excludes>
<properties>
<property>
<name>listener</name>
<value>io.testfly.listeners.RetryAnnotationTransformer</value>
</property>
</properties>
</configuration>
</plugin>
<!-- Embed version in MANIFEST.MF for cross-build-tool compatibility -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<!-- Required by Maven Central: sources jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Required by Maven Central: javadoc jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.3</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<doclint>none</doclint>
</configuration>
</plugin>
<!-- Required by Maven Central: GPG signing -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
<!-- Maven Central publisher (new Central Portal) -->
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.11.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<tokenAuth>true</tokenAuth>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
<!-- JaCoCo code coverage — runs on every build, report at target/site/jacoco/ -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.40</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
<value>COVEREDRATIO</value>
<minimum>0.30</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<!--
Runs tests that need real external backends (DeepSeek, ReportPortal,
live APIs, real browsers). Activate with:
mvn verify -Preal-backends
Requires AI_API_KEY and optionally REPORTPORTAL_API_KEY env vars.
-->
<profile>
<id>real-backends</id>
<properties>
<testfly.profile>real-backends</testfly.profile>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Keep unit tests running in the test phase. -->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.2.5</version>
<dependencies>
<!-- Integration tests are written with TestNG; force the
TestNG provider so failsafe does not fall back to the
JUnit Platform provider (which finds 0 tests). -->
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-testng</artifactId>
<version>3.2.5</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>**/integration/**/*.java</include>
<include>**/*IntegrationTest.java</include>
<include>**/*IT.java</include>
</includes>
<systemPropertyVariables>
<testfly.profile>real-backends</testfly.profile>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!--
Enables example tests (excluded from default mvn test because they need
real browsers and external services). Run with:
mvn test -Pexamples -Dtest=io.testfly.examples.tdd.AiAnalysisDemoTest
-->
<profile>
<id>examples</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/integration/**/*.java</exclude>
<exclude>**/*IntegrationTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!--
Activates JaCoCo, SpotBugs, Checkstyle and PMD with stricter thresholds.
Run on CI for pull requests:
mvn clean verify -Pquality
-->
<profile>
<id>quality</id>
<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.8.6.2</version>
<configuration>
<effort>Max</effort>
<threshold>Medium</threshold>
<xmlOutput>true</xmlOutput>
<htmlOutput>true</htmlOutput>
</configuration>
<executions>
<execution>
<id>spotbugs-check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.4.1</version>
<configuration>
<configLocation>google_checks.xml</configLocation>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
</configuration>
<executions>
<execution>
<id>checkstyle-check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.23.0</version>
<configuration>
<rulesets>
<ruleset>/rulesets/java/basic.xml</ruleset>
<ruleset>/rulesets/java/braces.xml</ruleset>
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
<ruleset>/rulesets/java/empty.xml</ruleset>
<ruleset>/rulesets/java/multithreading.xml</ruleset>
</rulesets>
<printFailingErrors>true</printFailingErrors>
</configuration>
<executions>
<execution>
<id>pmd-check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!--
Enables demo tests tagged with @Tag("demo").
Run with: mvn test -Pdemo
-->
<profile>
<id>demo</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>integration</excludedGroups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!--
Enables integration tests tagged with @Tag("integration").
Run with: mvn test -Pintegration
-->
<profile>
<id>integration</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>demo</excludedGroups>
<excludes combine.self="override">
<exclude>**/examples/**/*.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>