testkube icon indicating copy to clipboard operation
testkube copied to clipboard

Allow Testkube Testsuites to support custom test containers as step type

Open Blackmamba23 opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. Would be nice to have a way to run custom containers (that are tests) as part of suite step. This would be ideal for creating integration tests/mocks. An inspiration/example for something like this is testcontainers, if we can have a way to define a container to run in a Testkube step that would be awesome.

Describe the solution you'd like "steps": [ CURRENT step types {"execute": {"name": "testkube-api"}}, {"delay": {"duration": 1000}}, {"execute": {"name": "testkube-dashboard"}}, ----------------------------------- NEW possible step type {"run": { "image": "kafka/kafka", "port": 9092, etc.... }} ]

Describe alternatives you've considered NA

Additional context Created containers will need to be discarded after suit has finished running. Would also be nice to define resource requirements of the container to be run

Blackmamba23 avatar Aug 14 '22 13:08 Blackmamba23

Thank you @Blackmamba23 for an interesting idea. Definitely worth to conisder when we plan our next release!

vsukhin avatar Aug 14 '22 17:08 vsukhin

@povilasv can we close it?

vsukhin avatar Sep 27 '22 15:09 vsukhin

@vsukhin not yet, the container executors are only part of the solution, with them we can execute long running containers such as kafka, but we still need to update TestSuites so that it doesnt wait for kafka to finish executing and figure out how to stop the kafka at the end of the test suite

povilasv avatar Sep 29 '22 17:09 povilasv