Need to pass variable information starting from outside of Lisa entirely, all the way into using it in a test, or suite of tests.
The development of the test systems is picking up pace, and there are multiple hosting environments coming online. Must be able to programmatically pass which host to send the testing traffic to setup.
Currently, all of the tests are hardcoded with the development hostname, and now the tests need to be called with something like http://{{endpoint}}/blah/blah.
The pipeline that calls the Lisa tests suite does so with ANT. Currently trying to pass an environment variable through the ANT call and use it in Lisa. Need to know how this can be done.
After reviewing this documentation:
There is not a clear example using ANT via variable passing.
Release : 10.5
Component : CA Service Virtualization
Had a look at it and was able to spot that a config variable needed a simple folder name prefix added to it.
The solution now looks something like this.
<target name='run-junit-suite' depends='clean' description='run a test suite' >
<junitlisa lisahome='${env.LISA_HOME}' toDir='${report.dir}' printsummary='true' showoutput='true' user='${env.LISA_USER}' password='${env.LISA_PASSWORD}' registry='${env.LISA_REGISTRY}' config='${basedir}/Configs/${env.LISA_CONFIG}'>
<lisatest suite='${test.suite}'/>
</junitlisa>
<junitlisareport toDir='${report.dir}'/>
</target>
The missing ingredient is that when specifying a config… It’s not the name as it appears in Lisa. It’s the full file path to the file.config as it exists on the file system.
So in the Lisa project folder there would be a Configs directory, and to use QA, set LISA_CONFIG=qa.config as an environment variable.