testng-team/testng

Class not found org.testng.TestNGAntTask on updating TestNg to 7.10.0 and above

AutomationRia opened this issue · 8 comments

TestNG Version

7.10.0 and above

Expected behavior

The user should be able to execute Test using the TestNGAntTask task

Actual behavior

Getting error Class not found org.testng.TestNGAntTask

Is the issue reproducible on runner?

  • Shell
  • Maven
  • Gradle
  • Ant
  • Eclipse
  • IntelliJ
  • NetBeans

Test case sample

Below line code throws error now

<taskdef name="testng" classname="org.testng.TestNGAntTask" classpathref="classpath"> </taskdef>
image

dependency :
<dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>7.10.0</version> </dependency>
classpath is defined in code and code works fine fine with TestNg version below 7.10.0

Contribution guidelines

Incase you plan to raise a pull request to fix this issue, please make sure you refer our Contributing section for detailed set of steps.

This was called out as part of the release notes of TestNG 7.10.0. Please see https://groups.google.com/g/testng-users/c/6DmFaKUjIxY

The Ant specific changes now reside in a separate repo https://github.com/testng-team/testng-ant

You should be able to build and use it (It's a maven project).

@juherr - Thoughts?

@AutomationRia I'm surprised that someone still using ant.

Could you share with us your specific context?

@krmahadevan Maybe we can plan to make a release of the ant project.

@juherr - Release as in regular artifact or as a fat jar for this project?

Also does it need to be deployed in maven central or just publish it to github releases would do?

@krmahadevan a regular jar sounds better because it will work with future testng version (except if the cli api change)

Central is a good place

@juherr we have some automation test that uses Ant to trigger the test

Do we know when it will be released?
Tried to build the project using https://jitpack.io/#testng-team/testng-ant/-SNAPSHOT to use as a dependency in the maven project , but got below error.
image

@AutomationRia - You should be cloning https://github.com/testng-team/testng-ant and then running ./mvn clean package

@AutomationRia - Testng-ant is now released and is available on Maven central https://repo1.maven.org/maven2/org/testng/testng-ant/1.0.0/