Here is a simple Kotlin/JVM project.
Inside, you will find a SimpleCalc
object that can do 3 operations:
- Add integers
- Multiply doubles
- Calculate the sum of even numbers in an array
- Implement unit tests for
SimpleCalc
with a framework of your choice (JUnit, TestNG, etc.) - Create behavior scenarios and implement them with a framework of your choice (Cucumber, Serenity, etc.)
- Write a Python wrapper to run your tests
- Write GitHub Actions automation that will use your Python wrapper to run tests
Try to imagine basic and advances use cases to cover as much as possible. Imagine it's your project and you really care about its quality. Try to demonstrate the deep knowledge of a BDD framework you choose.
Yes, shell scripts are good enough in this case, but this is a testing exercise, so...
Python wrapper should be capable of:
- Separately run unit tests and BDD scenarios
- Save reports in parametrized
reports
directory - Save stdout and stderr logs in
logs
directory
# Run unit tests
simple-calc-test-runner --run unittests --reports-dir unit-test-reports
# Run BDD scenarios
simple-calc-test-runner --run scenarios