JUNIT 5 vs TESTNG
Features Comparison :
ADO do accept junit test reports.
To publish the the TESTNG test results, since Azure DevOps does not support TESTNG test results format, but TESTNG also produces JUnit test results in a separate junitreports folder. So, we can publish TESTNG test results in JUnit format instead.
TestNG objective is beyond unit test so it covers wider testing needs like Scenario Tests, Integration Test, Dependency Test, Ordering, Parallel Execution etc, but these feature are not supported in JUnit 5.
The JUnit 5 team have these above items in their road map, but they are extending a unit testing framework to support wider range of testing needs. Lets see how the new subsequent release of Junit 5 is able to address the wider testing need in comparison with TestNG
For Spring based application Junit fits best for doing the Unit and Integration Testing as it the default testing framework and Spring Provides lots of Test API with Mockito.
For general testing and Web Automation (Selenium) — TestNG is the de facto.