Service Virtualization

 View Only
  • 1.  SharedModelMap value not updating

    Posted Sep 13, 2019 05:55 AM

    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



    ------------------------------
    Thanks,
    Sabir
    ------------------------------


  • 2.  RE: SharedModelMap value not updating

    Posted Sep 13, 2019 06:15 AM

    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.

     

    Cheers,

    Danny

     

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 3.  RE: SharedModelMap value not updating

    Posted Sep 13, 2019 06:58 AM
    No Danny, we have single registry, coordinator, simulator running.

    PFB:


    I believe SharedModelMap  keeps all its data in registry memory and used when invoked.
    May i know how different is running test script in ITR or TestRunner.



  • 4.  RE: SharedModelMap value not updating

    Posted Sep 13, 2019 07:13 AM

    Hi,

     

    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?

     

    Cheers,

    Danny

     

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 5.  RE: SharedModelMap value not updating

    Posted Sep 13, 2019 07:29 AM
    Yes danny, i am passing my test case to coordinator by specifying Coordinator's name in my TestRunner command along with stageDoc.

    Just need to confirm, where SharedMapodelMap stores the value, meaning in db or in heap memory or any server component memory, where i can find these values?

    It will help me in debugging.


  • 6.  RE: SharedModelMap value not updating

    Posted Sep 13, 2019 08:05 AM

    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.

     

    Cheers,

    Danny

     

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 7.  RE: SharedModelMap value not updating

    Posted Sep 14, 2019 11:26 AM
    Hi Sabir,

    As per my understanding, This is maintained in-memory hash table at the JVM level. Vse restart will result in loss of data and state.

    Could you share the test case to have a look.

    Thanks.
    Vaibhav J

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 8.  RE: SharedModelMap value not updating
    Best Answer

    Posted Sep 15, 2019 11:48 PM
    Thanks Vaibhav/Danny,

    It got resolved as other colleagues were also using same table and key, which was creating an ambiguity for me