1

I have a WPF application and I have a custom object (the output) with images and text. I need to check if the output has a correct format. I tried with Coded UI but, because the element is a custom object, I can't compare its properties.

Which is the best tool to compare visual objects? I also need it to be able to automate the test.

Thanks.

2
  • This is amazing concept and have been searching more details in image comparison. Do you have any resources for the same? I would like to learn more on image comparison technique. Please share any links that would be really appreciable. Commented Apr 24, 2014 at 13:51
  • I ended up using snapshots and snapshots verifiers. I used the link in the answer. Commented Apr 24, 2014 at 15:02

3 Answers 3

1

TestApi (a .NET library) offers visual comparison and is pretty easy to get working. I flirted with the idea of integrating it with our project but I'm still not convinced that automated visual verification testing is suitable for long term regression testing. But if I had to do it then I'd start with TestApi. Here is the tutorial for comparing images.

1
  • Yeah, this was the one I ended up using. Thanks a lot. Commented Apr 24, 2014 at 14:51
1

I use TestComplete in order to test images. From the tool itself I store images (several formats supported) then, when I run my coded tests I compare the actual image on the running application (identified by object ID or by paths) with the stored image (it compares bit a bit). It works fine.

TestComplete supports WPF applications as well.

http://smartbear.com/products/qa-tools/automated-testing-tools/testcomplete-integrations/wpf-application-support/

Cons: It's a comercial tool.

3
  • It's a shame it is comercial.. Does it allow automatation of test? Commented Apr 22, 2014 at 22:05
  • Yes. It also supports C# scripting language as a base programming language for building your test cases and flows. As I mentioned before it is a comercial tool with hight prices... There are other tools which also compares images at a run time but they are comercial as well. So it's only advisable for enterprise projects.
    – cadid
    Commented Apr 22, 2014 at 22:19
  • 1
    A little more info on TestComplete - it's actually cheaper than most of the other big box commercial tools especially if you need to use multiple systems to execute your tests because SmartBear offers a lightweight execution application at a much lower cost. I'm not affiliated, just used the product for years.
    – Kate Paulk
    Commented Apr 23, 2014 at 11:13
1

Check this tools, a lot of them are open sourced, I heard that sikuli does the job regarding images, but never tried it. You can also take a screenshot of the screen and compare it to a saved one...

Not the answer you're looking for? Browse other questions tagged or ask your own question.