Search This Blog

Showing posts with label MSTR. Show all posts
Showing posts with label MSTR. Show all posts

March 5, 2013

MSTR Web Test Automation- one possible way to fix the issue of Dynamic Object ID


On Feb 19, I wrote a post about MSTR web test automation ( Use Telerik Test Studio to do MicroStrategy Web Test Automation successfully ). After that, one interesting challenge comes to me all the time.

I have some tests that need to click the Week/Month/Quarter Buttons in MSTR dashboard. But the tests always fail. After looking into the issue via Telerik Test Studio, I notice that the following yellow part (ID) is changed all the time. If the ID is dynamic, how can the test pass? The automation never clicks those buttons. That can explain why.


    public ArtOfTest.WebAii.Controls.HtmlControls.HtmlInputButton WeekButton
            {
                get
                {
                    return GetHtmlInputButton>("id=mstr262", "|", "tagIndex=input:0");
                }
            }

Is it possible for developers to make ID static for those Buttons? After talking to our developers, they say this is the Object ID and they can’t control it because they are still in development and is changed very often on MSTR side.

After several attempts, here is my solution:

Chrome has a good feature called “Inspect Element” if I do right click on the Week Button. Before clicking the Week button, inspect element features shows “mstr262”. After clicking the Week button, it shows “mstr265” or “mstr268”, or “mstr269”. ID is really dynamic.

Does Telerik support dynamic ID? The answer is using “~” as follows. “~” means contains. What happens if I try ~mstr26? 

    public ArtOfTest.WebAii.Controls.HtmlControls.HtmlInputButton WeekButton
            {
                get
                {
                    return GetHtmlInputButton>("id=~mstr26", "|", "tagIndex=input:0");
                }
            }


After I use the code above and rerun the test, the test really clicks the Week Button. The test passes.

February 21, 2013

Fixed the MSTR Desktop issue-ActiveX component can't create object


Today I got a new laptop (Windows 7 x64) and I needed to install a lot of software to make my multiple projects work smoothly. After I installed MicroStrategy Desktop and double clicked desktop icon, I got the  following error : ActiveX component can't create object


After doing some research, it is easy to fix the issue via the following command lines.

cd \windows\syswow64
regsvr32 /u regobj.dll   
regsvr32 regobj.dll  

Next time if you have the same issue, this trick should work for you.

February 19, 2013

Use Telerik Test Studio to do MicroStrategy Web Test Automation successfully

Currently I am working on MicroStrategy Project where the authenticated users need to login to MicroStrategy Web report via their credentials and they can view Business Intelligence (BI) report and dashboard from our Oracle database 11g.  Therefore , the data accuracy is more important.

The current situation is that we need to create the report in MicroStrategy desktop and then compare the data visually between the desktop report and the web report. It is really time consuming. Our manager would like to know if it is possible to do MicroStrategy Web Test Automation.

That being said, I need to do the following things :

Get the value from Oracle 11g via Visual Studio 2010 (ODP.NET) based on SQL query

Login to MicroStrategy Web (Version 9.3) and view the report (http , https or proxy)

The value in each cell can be extracted.

Compare the values in DB and the ones in MicroStrategy web report

After several attempts, I find using Visual Studio Web Performance Test to extract the value in different cell from MicroStrategy Web report is not possible, but using Telerik Test Studio to extract the value is very easy.

The interesting part is that when I run my tests in Windows Server 2008 R2 SP1 machine using Internet Explorer 8, the report can't appear in MicroStrategy Web, but it is working fine in Chrome and Firefox. Therefore, I choose Chrome to run my automation in Windows Server 2008 R2 . I would say it is a MicroStrategy Product bug in IE 8 in Windows Server 2008 R2.

Next time if you would like to do MicroStrategy Web Test Automation, you can use Telerik Test Studio easily.