When I run from TestNG or Maven test from locally all the test cases are working fine but in pipeline it gives me this "cannot access org.testng.Assert".
I am attaching the error screenshot of Azure Pipeline:
enter image description here
When I run from TestNG or Maven test from locally all the test cases are working fine but in pipeline it gives me this "cannot access org.testng.Assert".
I am attaching the error screenshot of Azure Pipeline:
enter image description here
2
Answers
I think you are facing this issue because of JDK version on the Azure pipeline.
If you can check first if you have JDK and second what is the version.
Locally the tests work because the JDK version is the proper one.
The error message: class file has wrong version 55.0, should be 52.0.
You should update Java version to at least Java 11.
Try adding task Java Tool Installer task.