Passing and read txt file to window eggplant command line

Hi experts,

I have a config file named as “TestConfig.txt”. The file is being read from the local directory using sense talk command. Now, I want to apply an automation script by calling the eggplant script using window command line. The “TestConfig.txt” will be uploaded by a user and it will be encoded using base64 File option on jenkins pipeline. For this case, how do I pass the uploaded “TestConfig.txt” file to eggplant script by using window command line? and, how do I read the uploaded file from the eggplant script?

Thank you
Siti

Hey Siti,

some ideas for:

how do I pass the uploaded “TestConfig.txt” file to eggplant script by using window command line

  • make use of a version control tool like git and let users upload the latest version of the testconfig.txt

  • use a shared location e.g. shared network drive and fetch the latest file and its name within your jenkins pipeline and compile the batch command to start eggplant.

  • pass the testconfig.txt file name as parameter to the script within the batch command. Runscript documentation link

  • maybe you do not need the file at all and users can just define a set of parameter values that are required and pass them to the script as parameters?

Always think about the users, their skills and background what is the easiest for them or what are they used to or know already and utilitze it for the inputs.

how do I read the uploaded file from the eggplant script?

Hope some of these do point you into the right direction. In case you have further questions kindly ask you to elaborate a bit more your approach.

Cheers,
Karsten

1 Like

Wonderful explanation!

Thank you for sharing Karsten

Regards,
Siti

1 Like