Hi Mahesh,
As far as I could understand, you create the variable files in runtime which overwrites the Iteration.csv file which has no value. That causes Javelin to use iteration variable value which is saved in flow.
I am sending you the cmd script file.
REM @echo off
if [%1]==[] goto error
if [%2]==[] goto error
(
echo ^<?xml version="1.0" encoding="UTF-8"?^>
echo ^<GTJavelinJob^>
echo ^<FlowPath^>C:\TDMWork\IterationFlow.vwf^</FlowPath^>
echo ^<VariableFilePath^>C:\TDMWork\IterationFlow.csv^</VariableFilePath^>
echo ^<LogFile^>C:\TDMWork\mylogfile.log^</LogFile^>
echo ^<outdir^>C:\TDMWork^</outdir^>
echo ^</GTJavelinJob^>
) > C:\TDMWork\IterationFlow.xml
(
echo Name,Value,Scope
) > C:\TDMWork\IterationFlow.csv
(
echo "iteration","%1","Flowchart"
) >> C:\TDMWork\IterationFlow.csv
(
echo "i","%2","Flowchart"
) >> C:\TDMWork\IterationFlow.csv
"C:\Program Files\Grid-Tools\Javelin\JavelinExecutor.exe" file="C:\TDMWork\IterationFlow.xml"
goto end
:error
echo.
echo ** ERROR SPECIFYING PARAMETERS
echo.
echo ** TO RUN: filePath OutFilePath
echo.
:end
Could you please try with that one?
Run as "IterationFlow.cmd 8 0"
8 > Iteration count
0 > value of i which iteration should start
Best Regards,
Original Message:
Sent: 04-19-2021 04:22 AM
From: Mahesh
Subject: Javelin workflow execution using Jenkins
Hi Cihan,
I am using 4.9.155 Javelin version. I tried with admin cmd prompt, but still no luck.
Original Message:
Sent: 04-19-2021 04:10 AM
From: Cihan Ankara
Subject: Javelin workflow execution using Jenkins
Hi Mahesh,
I tried again and it worked just fine.
Could you please check if you run CMD as administrator? Also, what version of Javelin are you using?
Best Regards,
Original Message:
Sent: 04-19-2021 02:12 AM
From: Mahesh
Subject: Javelin workflow execution using Jenkins
Hi Cihan,
I have executed the sample setup shared, and see the same behavior as that of earlier. (loop getting executed for the parameter configured in workflow, rather than the argument at runtime). In this case, I have the iteration as 1 in the workflow and 3 in the CSV input file. Perhaps, it is not loading the configuration file correctly with the argument value, despite being able to access file/path C:\Program Files\Grid-Tools\Javelin\JavelinExecutor.exe.Config.?
logfile:
Original Message:
Sent: 04-16-2021 09:49 AM
From: Cihan Ankara
Subject: Javelin workflow execution using Jenkins
Hi Mahesh,
I tried to replicate the case as basic as possible and It worked fine. I am attaching the sample flow and files.
Best Regards,
Original Message:
Sent: 04-16-2021 05:30 AM
From: Mahesh
Subject: Javelin workflow execution using Jenkins
Hi Cihan,
Thanks for the suggestion. I have tried the option of running Javelin flows in Batch mode and it is working fine when I am not passing any argument as parameter at run time from the command line. (which considers the variables that are already defined in the workflow). But when I am passing the parameter/s from command line as part of batch execution, the Javelin flow does not consider the provided parameter value for the variable even though it is getting reflected correctly in the CSV file created where the variables are defined.
Eg: In my case, I have a variable for iterator, and the flow must execute for the iterator count. When I am providing value for this (say 2) in the workflow and running it in batch mode, it is getting executed for the iterator count (twice in this case). But when I am passing this variable value as argument (say 3) while executing the batch from command line, it still considers the value provided in the workflow (which is 2) and does not repeat thrice. When I do not assign any value for that variable in the workflow and try passing it from the batch mode, the flow does not iterate.
Please can you advise here.
Original Message:
Sent: 04-15-2021 04:32 AM
From: Cihan Ankara
Subject: Javelin workflow execution using Jenkins
Hi Mahesh,
You can use JavelinExecutor to run Javelin flows in Batch Mode. So, you can also pass variables by using variable file. Detailed information on below link.
https://techdocs.broadcom.com/us/en/ca-enterprise-software/devops/test-data-management/4-9/javelin/run-javelin-in-batch-mode.html
Best Regards,
Cihan
Original Message:
Sent: 04-15-2021 03:04 AM
From: Mahesh
Subject: Javelin workflow execution using Jenkins
Hi there,
We are developing Javelin workflow to automate the data generation process. We are using GIT Lab as a configuration management tool and Jenkins for CICD integration. So would like to understand the process of executing javelin workflow from Jenkins via Gitlab and how parameter values can be passed to Javelin in this scenario.
regards,
Mahesh