I'm trying to execute a file in TestNG without any xml file, just a direct run as shown on youtube. However, I'm getting the error below. Why is this?
Exception in thread "main" java.lang.NoSuchFieldError: Class org.testng.CommandLineArgs does not have member field 'java.lang.Integer port'
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:69)
TestNG version - 7.10.2 Eclipse version - Version: Oxygen.3 Release (4.7.3) Java version - java 21.0.2
What am I missing out?
I'm trying to execute a API in rest assured in TestNG.
Just change the testNG version from 7.10.x to an older version like 7.7.x or 7.8.x.
It will 100% work.