Selenium vs Coded UI Thoughts

Selenium vs Coded UI Thoughts

big-logo

I should mention that this is not intended to be a full in-depth review and comparison of the two UI testing frameworks, just a quick post on my general thoughts after using both of them on the same project.

I have recently started work on introducing some basic automated UI tests to one of our solutions. Before I started down this road, I naturally googled “Selenium vs Coded UI”, to get an idea of differences, pros and cons of each, etc. There are quite a few articles out there that break this down, but I am going to give you some thoughts from my personal experience with both of these testing frameworks.

First of all, I should mention that I will be testing an MVC web application. This is the only reason that I could even consider using the Selenium WebDriver, as it does not support testing of non-web applications. I have also had some previous experience writing tests with Selenium. It was this reason that actually had me initially go down the road of using Coded UI. It was new to me, and I wanted to learn a little bit about it before deciding if it would be a good fit. Plus, it being essentially “built into” Visual Studio was a pro for me.

Coded UI was initially pretty painful for me. It just wasn’t as “easy” as I though it should be to do simple things, like finding an element on a page, and entering some text, etc. There are even extension libraries out there to help with this. To me that suggests that it’s not as easy as it should/could be. Coded UI did have a very nice test recorder IDE that is built right into Visual Studio, this was definitely a pro, and is something that could come in very handy for someone who wants to write tests in C# but has limited knowledge of the language perhaps. (QA maybe) Although for this scenario, I wanted to hand write these tests  to have complete control over everything, so the recording IDE was more than I needed. It also generates a ton of code since it literally mimics every action you perform. (Hovers, pauses, you name it). Another thing to note about the project I am testing, is that it relies heavily on the Telerik Kendo UI MVC controls. These can sometimes be difficult to test merely through browser emulation like we’re doing. To be honest, I quickly gave up on Coded UI, it just didn’t feel like it was flowing as easy as I thought it should have.

I then made the switch to the Selenium WebDriver and never looked back. To be fair, I was somewhat familiar with Selenium, but even still I found it very easy to jump right in and create some tests very quickly. I also like that you can provide different drivers for each browser, whereas Coded UI is mainly for testing against IE.

Overall, it was pretty easy to find elements on my page using Id selectors, class selectors, etc. There is also a recording plugin for Firefox, if you wanted to go that route. Once again, I just wanted to hand code these tests.

By default, most people will use the Firefox driver with Selenium, but I opted to download and install the IEWebDriver. I simply had to copy this .exe into C:\Windows, and I was off. Note* – Your build server will also need this .exe to be able to run tests obviously.

Conclusion: I found Selenium a lot easier and more intuitive to work with in this particular scenario, which was a web application making heavy use of client side controls with Kendo UI. I also had much better success with documentation and troubleshooting help with Selenium. The Coded UI community seemed a little more scarce, and trying to figure out how to do basic things was sometimes difficult.

If you had similar, or different experiences with these frameworks, I’d love to hear. Is it worth giving Coded UI another chance?

Thanks for reading.

 

Share Your Thoughts!

Testimonials

What My Clients Say

Karin - Hope and Future

Brent has always been very prompt and generally exceeds our expectations with his work. His maintenance fee is very reasonable. I strongly recommend him!  We get many compliments on our beautiful web site!

Dan

I contacted Krueger Web Design and Brent did everything.  He setup a test site with the changes so we could verify everything was correct before we transferred from my old hosting provider.  During the setup and conversion Brent was extremely professional and responsive. He responded to any issues the same day.

Dan Kaufman
Emily - GFCLT

We've had a great experience working with Krueger Web Design. Prompt responses, great ideas, effective work... all at a reasonable price! This was the perfect fit for our organization.

Mahmud - ACMC

I would love to recommend you to anyone! You have been very helpful when we needed you the most.

Brian - SEMNIC

Working with Krueger Web Design was effortless. Communicating what I wanted for the website and the results that I saw were identical. The customer service was always prompt and I am completely satisfied with the product.

Zach - Stadium Club

Exactly what I wanted! Fast turnaround time and very affordable. Answered all of our questions quickly and made adjustments promptly. Very easy to work with and puts everything into terminology that even I can understand!

Contact Krueger Web Design

Have a question for me? Need an estimate on some work? You can email me at brent@kruegerwebdesign.com or drop me a line using the button below:

Copyright © 2017 Krueger Web Design - All rights reserved
Web Design in Madison, WI