Two Vitaq AI windows open run error

When trying to run a Vitaq Test Activity you get the error message as shown below.

This is a standard error that Vitaq AI has failed to run the Test Activity. The next place to look for error information is the Script Output tab.

 

The Script output informs us that the Vitaq Test Activity run was able to connect with the vitaq_client.js so all is good there. But it does not run, so we now need to look at the client window log.

Here we can see the client connects with the Test Activity but immediately closes the session and reports an error with the tearDown script.

This error occurs when you have two Vitaq AI windows open in the container and you try to run a Test Activity in one of them, Vitaq AI is confused about which Test Activity session should be active at any one time and hence will stop with this error.

To run multiple Vitaq AI sessions in parallel, you need to spin up seprate docker containers and run them in parallel. There is no limit to the number you can run in parallel and hence you can do this with different JSON run configurations to test difference browsers or devices or use different starting seeds for exploratory testing (non-AI) mode and leave your massively parallel Vitaq sessions to automate your exploratory testing needs.

 

JavaScript syntax error in jsFunctions file

A common and popular way of writing JavaScript code for testing is using the Page Object Model (POM). In Vitaq Page Objects (classes) need to be created in the jsFunctions file. These methods are then reusable across all Test Action Scripts. So when you have a syntax error in the jsFunctions code, Vitaq may report the error in the setUp test Action Script because it is the first code that Vitaq runs.

For example, if you miss the () off the first method in the jsFunctions file as shown below:

Page Object Model Syntax Error

When you run Vitaq, it will error with a syntax error into the Script output log with a code line number and reference pointing to the setUp test Action Script function code, when actually the syntax error is in the jsFunctions file code. As shown below.

Debugging JavaScript Syntax Error

 

Error: TypeError xxxXxxx.xxxXxxx is not a function

When running a Vitaq JavaScript client based Test Activity you may experience the “is not a function” error such as shown below.

is not a function error

This can happen when you are trying to call a method (function) in a Test Action Script that doesn’t actually exist because you have not defined it correctly in the jsFunctions file or the Test Action Script. Such as shown below where we have inadvertently left a typo in the method (function) name enterAccountNNameSavings(savingsAccountname) when we have tried to call it in the Test Action Script as accountSavingsAdd.enterAccountInitialDepositSavings. So you can see the extra N typo in “enterAccountNNameSavings” leaving Vitaq thinking that the method (function) is not defined.

https://vitaq.io/2020/11/02/model-based-vs-sequential-testing/