What are JUnit and pytest?
Options
- Testing frameworks for Java and Python respectively (Correct option)
- Cloud services that run tests on remote servers
- Databases that store the results of test runs
- Build tools that compile and package the projects
Answer
Testing frameworks: JUnit for Java and pytest for Python, used to write and run automated tests
Why
A testing framework gives you a standard way to write test methods, check results with assertions, set up data and see a report.
JUnit is the main one for Java (JUnit 5 introduced the Jupiter style; JUnit 6 is the newest major version and requires Java 17 or newer). pytest is the most popular for Python.
Build tools like Maven run them with mvn test.
Remember
JUnit = Java tests. pytest = Python tests.