search cancel

Write to File step does not create file when staged

book

Article ID: 37655

calendar_today

Updated On:

Products

CA Application Test CA Continuous Application Insight (PathFinder) Service Virtualization

Issue/Introduction

As part of our DevTest automation, we have Input data sets which were read by Test scripts and these Test scripts in-turn write output data into Excel/csv files which are used by further test scripts.

When we run these test scripts in ITR mode, we are not facing any issues.

However when we stage test suites locally, Input data is read by test scripts from Input data files which are present in DevTest Project folders, but output data is not written into output data files that are present in DevTest Project folder.

Instead DevTest is creating temp folders for project under C:\Users\xxx\lisatmp_x.x\lads and writing data into these files. Due to this behavior, actual files located in DevTest Project folder (C:\DevTest\xxx) are not getting updated and further scripts that uses this generated data are not getting executed with proper data. One workaround, we are right now using is to hard code the LISA_RELATIVE_PROJ_ROOT, however we will have to change this every time and it is cumbersome process

 

Cause

LISA_RELATIVE_PROJ_ROOT cannot be used when writing output files because the output files will be written into the lads directory and the lads directory is temporary that will be deleted once the test is finished running

 

Environment

All supported DevTest Environments

Resolution

Set new property CUSTOMER_HOME=C:\DevTest\xxx in the local.properties and referenced {{CUSTOMER_HOME}} in the write to file step in lieu of {{LISA_RELATIVE_PROJ_ROOT}}

Additional Information

A property can also be created in the project.config file in the project instead of the local.properties file.

If you create a property in the local.properties file, DevTest components will have to be restarted.