skip to Main Content

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

enter image description here

2

Answers


  1. 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.

    java -version
    

    Locally the tests work because the JDK version is the proper one.

    Login or Signup to reply.
  2. 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.

    - task: JavaToolInstaller@0
      inputs:
        versionSpec: '11'
        jdkArchitectureOption: 'x64'
        jdkSourceOption: 'PreInstalled'
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search