Qlik Community

Qlik Sense Deployment & Management

Discussion board where members learn more about Qlik Sense Installation, Deployment and Management.

Johnny
New Contributor

Qlik Sense App Testing with Selenium in Python

Hi,

I'm trying to see if I can utilize Selenium to do some UI testing of my Qlik Sense dashboards before I deploy them to production. I am still pretty new to using Qlik Sense in production. A few of the things that I am checking for are:

  • Any graphs/filters/extensions that fail to render.
  • Filters that aren't able to be populated (E.g. Dropdown menus that don't show any options when you click them)

My plan is to write a python script to use Selenium, access the dashboard from my Qlik Sense Hub and try random combinations of filter selections, to see if anything fails to load.

Currently I'm using this sample dashboard to test it out.

The problem is that I'm having issues identifying the filter and chart javascript elements. I'm currently using FireFox to inspect the page source, but still unable to find anything.

Hoping someone could help with this, maybe some links on the XML structure of a Qlik Sense App and it's elements, or any useful articles of Qlik Sense App testing done with Selenium.

Thanks!

Labels (3)
5 Replies
JustinDallas
Valued Contributor II

Re: Qlik Sense App Testing with Selenium in Python

Um, I'm not sure if they use too much XML.   Just looking at the rendered html, they have lots of Angular components.  The components should be easy to find once you know the css class they belong to which I'm sure is listed somewhere.  Personally,  I was able to find my components and their properties by using the Chrome Console.

 

CSSSelector.png

 

 

Johnny
New Contributor

Re: Qlik Sense App Testing with Selenium in Python

Oh yeah, you're totally right! The dashboard objects (Graphs and Filter panels) seem to be AngularJS objects.

I'm researching to see if I can use ProtractorJS to do the testing. But gonna have to learn JS. (My background is in python)

I was secretly hoping that Python + Selenium would do the trick, but I guess not.

By the way, I don't quite get what you mean by finding the CSS class that the components belong to, could you elaborate a little on that?

Thanks!

JustinDallas
Valued Contributor II

Re: Qlik Sense App Testing with Selenium in Python

Python + Selenium will do the trick.  If you aren't familiar with CSS/XPath selectors and CSS classes, you might have a very difficult time.  Even ProtractorJS uses CSS selectors so you can't run and you can't hide.

Johnny
New Contributor

Re: Qlik Sense App Testing with Selenium in Python

I am familiar with XPath selectors. The primary issue I have now is figuring out which of the div classes are AngularJS and how to interact with them.

If it's not too much trouble, could you show me maybe one small example? Maybe change a filter selection or something? Would be greatly appreciated.

When it comes to frontend stuff I only know basic html structure and CSS styling, and some basic javascript and D3.

Highlighted
yuvaraj2020
New Contributor

Re: Qlik Sense App Testing with Selenium in Python

Please suggest Idea or document for  Selenuim + Python, How to create automated test scripts with Selenium and Python against Qlik Sense apps