#how to test dagger pipelines
1 messages · Page 1 of 1 (latest)
That's a nice question:
For 1 & 2, you can check our docs, we have plenty of examples, I think the quickstart can give you a nice overview on how you can do that with Dagger: https://docs.dagger.io/quickstart
For 3, I'm not sure it's currently possible, operations are executed in the dagger engine, not directly on your host itself so I don't think you can.
But, you can create custom span to have a better view or your pipeline, we expose OTEL function to create custom.
Do we have any docs about that (/cc @dull tinsel ?)
for 1 & 2 - may be I was not clear, let me try to add more context
suppose i have dagger pipeline written mostly as an orchestrator calling other modules/functions, I would like to test that behaviour(not writting test job/stage :-p) using unit test or integration test , is there sdk support for that?
for 3 - also i am looking for a way to debug such pipelines using IDE integration, i did see some docs around but could not get it work
IDE integration docs are at https://docs.dagger.io/manuals/developer/ide-integration. can you provide some details on which language you're using, what you tried and what didn't work?
im pretty sure 'using a debugger' is not possible, as previously stated you cannot attach a debugger because the code is not executing on your host machine like traditional code. It's being deployed and executed remotely, sometimes on a local container or some other place like a k8s runner. Maybe that's something planned for the future?
for point 1 - I think there is still on-going discussions about how this can be achieved, i havent found any docs on 'unit testing your dagger code'
for point 2 - 'integration testing' - this kind of follows on from point 1 working or having a concrete method in place, but right now, the best way to test, is to write the pipeline locally and execute it locally.
if you can have a local version working, you can understand the behaviour and then execute that same function in CI.