DevTest default assertions can be added manually to a VSM?

Document ID : KB000016192
Last Modified Date : 14/02/2018
Show Technical Document Details
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.

Question:

Can default assertions be added manually to a VSM?

Environment:
All supported DevTest environments.
Answer:

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.