Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Report naming issue using command line

LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in SOAtest
Hello-

I have run across an issue that a couple of previous posters have but, have yet to run across a resolution. I am using the command line feature to run all of our tests in a batch process and have an issue when using %d for reporting - it is printing literal 'd' instead of the date: so, my report is d_ReportName.html instead of 080418_ReportName.html.

This is not the case if I run the command manually from the command line but, if I create a .bat file and run it I get the literal date instead of the date stamp. I have gone to a rename using batch commands but, it would be much more efficient to have the %d worked as intended.

My command:
st.exe -cmd -runtest -all C:\dev\2008\InqAndSrch -reportHTML "C:\dev\2008\Reports\%d_InqAndSrch_Report.HTML"

I am running Windows XP Professional Version 2002 SP 2 and SOATest 5.2.2 SP 1, Java Version: 1.5.0_11


Thanks for you time,

xyzdwa
Tagged:

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    edited April 2008
    This is related to how the percent sign is interpreted in batch files. For example, if you open up a command shell and execute your batch file from it, you will notice that it prints out the content of the batch file. Further notice that it has removed the "%" sign in front of the d, and this is why the literal letter d appears in the file name as opposed to a date stamp. In order to get around this, simply add another % sign in front of the first one, which will serve as an escape character for the latter percent sign.

    In essence you should have the following command:

    My command:
    st.exe -cmd -runtest -all C:\dev\2008\InqAndSrch -reportHTML "C:\dev\2008\Reports\%%d_InqAndSrch_Report.HTML"

    The change is in bold.

    Hello-

    I have run across an issue that a couple of previous posters have but, have yet to run across a resolution. I am using the command line feature to run all of our tests in a batch process and have an issue when using %d for reporting - it is printing literal 'd' instead of the date: so, my report is d_ReportName.html instead of 080418_ReportName.html.

    This is not the case if I run the command manually from the command line but, if I create a .bat file and run it I get the literal date instead of the date stamp. I have gone to a rename using batch commands but, it would be much more efficient to have the %d worked as intended.

    My command:
    st.exe -cmd -runtest -all C:\dev\2008\InqAndSrch -reportHTML "C:\dev\2008\Reports\%d_InqAndSrch_Report.HTML"

    I am running Windows XP Professional Version 2002 SP 2 and SOATest 5.2.2 SP 1, Java Version: 1.5.0_11


    Thanks for you time,

    xyzdwa