Can DevTest Default Assertions be Added Manually to a VSM?

book

Article ID: 16192

calendar_today

Updated On:

Products

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

Issue/Introduction

 

When a VS is created, there are some default assertions added automatically to a VSM. 

Some new functionalities were added to virtual services in DevTest which were not there in earlier versions. When virtual services are migrated from older versions to newer versions, they will not have the new assertions. For example the below assertions were not there in earlier versions.

. If learning

. Failover

This article will provide information on adding these assertions to a VSM is recommended or not.



Can default assertions be added manually to a VSM?

Cause

 

N/A

Environment

All supported DevTest environments.

Resolution

 

It is not recommended to add assertions manually to a VSM.

 

For example, "If learning" assertion has below XML when it created automatically.

----

<CheckResult assertTrue="true" name="If learning" type="com.itko.lisa.vse.stateful.AssertOnExecutionMode">

<log>Current execution mode is Learning, branching to Virtual HTTPS Live Invocation {{LIVE_INVOCATION_PORT}}</log>

<then>Virtual HTTPS Live Invocation {{LIVE_INVOCATION_PORT}}</then>

        <executionMode>LEARNING</executionMode>

</CheckResult>

-------

 

If an assertion is added manually, then it will be like below:

<CheckResult assertTrue="true" name="If learning" type="com.itko.lisa.vse.stateful.AssertOnExecutionMode">

<log></log>

<then>Virtual HTTPS Live Invocation {{LIVE_INVOCATION_PORT}}</then>

        <executionMode>VALIDATION</executionMode>

</CheckResult>

 

The above information is not correct, which will cause the issues in "Learning mode".

 

It is recommended to create a new Virtual Service, which will add all the default assertions automatically.