What you can do using Katalon Studio WebUI keywords is to get access to the HTML Document of your Web pages exposed by a browser through the WebDriver protocol. The W3C Web Driver specification does not support API through which Browsers send log events (such as a HTTP Request sent, a HTTP Response received, etc) to the WebDriver clients such as Katalon Studio. Therefore the Katalon does not support feature with which you can inspect how a browser talk to backend servers with HTTP request/response.
Sorry, i missed to explain my test needs at first…
There is (anywhere, not reachable by me) a digital analyst, who implements web analytic (GA+GTM)
There are (anywhere, not reachable by me) developers, who make code commits, which (often) make implemented web analytics corrupt by change or disappear of DOM elements or the like.
There is me, who should establish a test prozedure, where digital analyst is notified, if any code commit maked his analytics code corrupted.
Just a simplest thing: there was a button like click - to this element, located as id=“666” was tied a click event with certain content. After code commit id=“666” was changed to class=“666” - click event is no longer fired.
In this setup i would like to inspect whether click event is still sent and what it contains. If i can’t recognize the click event content or the click event isn’t fired at all - i notify digital analyst: dude, your button click tracking is gone.
(1) The target web app uses Google Analytics. All the access to the web app is recorded and analyzed by GA.
(2) I will develop a Test Suite in Katalon Studio for the target web app. The test will traverse the web site while clicking all of buttons which send requests to various URLs. I will try to make the test as comprehensive as possible for clicking ALL the buttons. The test cases just do clicking; will do no verifications.
(3) I will setup 2 more hosts, apart from the production, for the target web app: for example “develop.kazurayam.com” and “staging.kazurayam.com”. Both hosts are exposed to the internet and can communicate with GA so that I can obtain the analytics results of both hosts. I will deploy the latest development version of the target web app to the “develop” host. I will deploy the current production version to the “staging” host.
(4) I will run the Test Suite (just to click all the buttons) against both hosts.
(5) I will compare the 2 sets of GA analytics results somehow. Theoretically the two should be identical as long as you run the same Katalon test suite. If any difference found and whatever the difference is, I will talk to developers to let them look at the insident.
NIce idea:) @4280-kazurayam - i’m already a little bit further: the current setup is:
there is a developer mirror of the site, like stage.site.com. On the production.site.com i run Google Analytics with analytic.js, on the stage i run it with analytic_debug.js. Further i run tests with Katalon on stage and… now it is the most important part, which isn’t ready… i want to record console.log of the testing browser - analytic_debug.js writes into console.log everything about the health of tracking. The console.log output is enough for me to say definitely “there is tracking wrong, here is it ok”.
Any idea about recording of console.log with Katalon? Or anyhow on other way? I want to have an output into a file, like one url - one file.
Thanks @4280-kazurayam - it looks indeed very promising! However to test it i need to run tests in Chrome with installed own extension (i need to install analytics_debug.js as an extension).
Do you have an idea how to run Katalon test on Chrome with extension installed by my own?
(Its a kind of standalone question, which deserves its own thread, but it is in context of this thread. If we are ready with it, i would write a step-by-step walkthru - it could be interessant for somebody)