Re: TestComplete and ReactJS

There's no specific support documented for ReactJS... however, it is a JavaScript control library and, as far as I know, most such libraries work very well with TC. You may need to do a little bit more work to interact with specific control types (working through native methods, properties and such), but, for the most part, most web controls are easily accessible in the TC object browser.

Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.I love good food, good books, good friends, and good fun.

Re: TestComplete and ReactJS

Hi,

Yes, TestComplete supports ReactJS as any other jscript library.

The problem with ReactJS (and Angular, for example) is that they generate html markup without any usable identifiers. So you will have fun trying to identify this or that element on the page. But this is irrelevant to TestComplete because you will have exactly the same fun with Selenium, Appium, etc.

Regards,Alex[Community Expert Group]____[Community Expert Group] members are not employed by SmartBear Software butare just volunteers who have some experience with the tools by SmartBear Softwareand a desire to help others. Postings made by [Community Expert Group] membersmay differ from the official policies of SmartBear Software and should be treatedas the own private opinion of their authors and under no circumstances as anofficial answer from SmartBear Software.[Community Expert Group] signature is used with permission by SmartBear Software.http://smartbear.com/forums/f83/t86934/community-experts/================================

Re: TestComplete and ReactJS

Hi Alex-FCAL,

Did you finally use TestComplete for your React Apps?

I'm currently evaluating TC as a possible automation tool for our react apps, and I'd be interested to hear your experience.

One thing I see already during my evaluation is that any graphs, charts etc in the app (and our apps have lots of these) are not recognised as any special type of object in TC. Only a node with ObjectType SVG for the image.

I mean, its not like there is some sort of e.g. bar chart object like I see for button or text box controls.

I'm guessing this is due to how React works rather than a deficiency in TC (would be nice to have this confirmed).

I guess this means the only way to verify these components is by image checkpoints, which makes me somewhat nervous regarding long-term maintainability of test suites.

The problem with web pages created using React and/or Angular libraries is that in 99% of cases developers do not provide unique and stable identifiers for web elements. This is the actual problem that significantly complicates automated interaction with such web pages regardless of the test automation tool been used.

Your problem with SVG is not related to React, but to the fact that anything displayed on SVG's canvas is generated as pure graphics primitives via script code on the page, but not as some graphic objects. Again, this problem is not TestComplete's specific and exists for any test tool and any web browser.

There are two ways to proceed with SVG web elements:

a) You may consider image comparison if the only thing that you need is to verify that the generated graphics matches expected master one; (Image comparison will require proper actions in test and may appear to be not as reliable as you would like it to be, but might work.)

b) Talk to your developers and ask them to let you know what data structures and script functions on the page you may use in your test code in order to verify, for example, that correct data were used to build SVG image.

Regards,Alex[Community Expert Group]____[Community Expert Group] members are not employed by SmartBear Software butare just volunteers who have some experience with the tools by SmartBear Softwareand a desire to help others. Postings made by [Community Expert Group] membersmay differ from the official policies of SmartBear Software and should be treatedas the own private opinion of their authors and under no circumstances as anofficial answer from SmartBear Software.[Community Expert Group] signature is used with permission by SmartBear Software.http://smartbear.com/forums/f83/t86934/community-experts/================================