Hi there, i am having a SharedModelMap, whose value is dynamically updating as per certain validation. i have embedded this SharedModelMap in one test script and run in ITR, all is working as expected in ITR. When running the same using Jenkins or even through TestRunner, values are not getting updated for given keys in given table.
Can anyone help me in knowing why its not working in Testrunner or CI tool, but wotking in ITR
Can it be that you have many Simulators running? There will be one SharedModelMap per simulator process, if the Coordinator distributes your testcases over multiple simulators then you will miss out on some updates. If that would be the case then using the staging document you can direct the coordinator to execute all the testcases in the same Simulator.
I have always assumed that the SharedModelMap implementation would be the simplest implementation possible – ie. a thin functional layer over one of the standard java maps – and hence that it would run inside the java process where your workflow would execute – ie. VSE or Simulator. And now writing it down and thinking about it I am almost sure it is so because you loose your sharedmodelmap contents as soon as you restart your VSE, so a big indicator that it is kept in VSE memory. But who knows, maybe someone from engineering team proves me wrong?
When you are running with TestRunner which simulator do you use? Are you sending the testcases to the Coordinator (Coordinator@default) or are you executing testrunner against your local workstation installation?
To my knowledge, SharedModelMap lives inside the process that executes the workflow in which it is used. These are all headless processes, there is no UI where you can see those values. For debugging, I would print the complete contents of the SharedModelMap to the log whenever you are accessing it, when you're putting values as well as when you are getting values. (eg. using System.out.println() commands)
P.S. again, when thinking about how you are executing this: are you running your suite using multiple Virtual Users? And if so, are you expecting that your testcases will execute in a defined order? Because, if so, when using multiple Virtual Users the order of execution would not be certain.