Deploying External Files

Hello everyone,

My colleague is developing a test plan that uses images and some binary files. We want to deploy that test plan to other computers but we don’t want to move files and select their paths in the test plan again and again.

Is there a way of embedding files in a test plan? Or another solution?

Hi @btyilmaz,

This can get a bit complicated but it is not impossible to do.

If you make a class that inherits TapSerializerPlugin, then, when it sees a test step, it can iterate all the properties and check which are marked with the FilePath attribute. If that points to a file that exists you can embed it the test plan as base64 or upload it to some shared location or put it in some accompanying file.

Then upon deserialization you can restore the files to the locations they have in the test plan.

1 Like

Thanks for the answer, as you said it seems a bit complicated but I will look onto it in the future. We just included test plan and the other files in the TapPackage for now.

1 Like

I have implemented a feature like this myself, so I can confirm that it is possible.

Just let me know when you need some more hints :slight_smile:

1 Like