How to Human-Behaviour Test your ASP.NET MVC Application

2. February 2009

I’ve been using a super-cool application in the development of Nett 30 that’s let me automate a lot of the tedious functional testing that is needed after every change in the application.

You know what I mean – you make a change to the code and you’re sure everything will work correctly, however, you still have to manually click through every function of the app in the web browser and test to ensure it’s solid and ready for users.  This takes a lot of time and effort – and the more complex your app gets, the more time and effort it takes!

“Functional testing” AKA “When users click around mp app, does it still work as expected?” is the process of ensuring your application functions as expected in the users web browser.

There must be an easier way right… well there is, and I’m pretty sure I was drooling when I found it…

The application is called Selenium and quoting their website: “Selenium is a Firefox add-on that records clicks, typing, and other actions to make a test, which you can play back in the browser.”

If you’re an ASP.NET MVC developer (or any web developer really), you need to be using Selenium.  Here’s what it’s done for us, and hopefully what it can do for you:

1) Every little change we make to the code, we test with Selenium immediately.  If the tests pass, we move on to the next change.  This gives us piece of mind that we’re not building bugs on top of bugs.

2) Every release we do we check with Selenium - then do a manual human test as well.  This gives us huge comfort that the release will function as expected for users.

3) We’re finding it’s saving us 50% of the time we used to use with functional testing and it costs us nothing!  We used to have to human-test the app regularly during development of a feature, not that’s not really necessary – all we do is human-test when the feature is complete and use Selenium for minor testing.

4) I sleep a whole heap better :)

Selenium is not just a Firefox plug-in however.  You should also download the Selenium Remote Control that allows you to run your tests automatically in different browsers and also modify the tests.  Selenium also exports your tests as C# so you can integrate them in your Visual Studio testing workflow and control them from there.

Remember Selenium is not an entire replacement for human testing but it does eliminate a lot of the human testing you have to do.

All in all, if you’re developing for the web you owe it to yourself to try Selenium – it’s totally free and it might just be the best thing since sliced bread?  Let me know what you think :)

Link to Selenium: http://www.seleniumhq.org

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

ASP.NET MVC

ASP.NET MVC: Upgrading our live app from Beta to Release Candidate 1

27. January 2009

Well it’s great news that ASP.NET MVC is at Release Candidate stage.  According to the MVC team, this release offers us the final update before it’s at the final v1 milestone.  For a full run-down on what’s changed, what’s improved etc check out ScottGu’s blog post or Phil Haack’s.  For download links and additional tutorials, please visit the asp.net mvc website.

We’ve developed out latest web application, nett 30 entirely using MVC, starting from the Preview 2 release and finally this morning updating it to this Release Candidate.  Check out my up-coming posts for how we used MVC to create nett 30 – I’ll be outlining in detail how most of the main features have been implemented.

Today however, this post deals with the upgrade from Beta to Release Candidate 1, so without further ado…

Overall the update went very smoothly and thanks to the unit testing that was baked in to our application and the great functional tests we had that were created in Selenium, the upgrade process was pretty painless.

We did encounter a problem with the Html.DropDownList helper however…

Technorati Tags: ,,,

When we ran our functional tests, Selenium reported back that we were getting some failures:

image

Turns out the problem was simply fixed by getting rid of the “”’s and the drop-down was then created and populated correctly again.  I couldn’t find this documented anywhere in the release notes so I thought I would mention it here – so you know before you push the upgrade button, what to expect.

So, all in all a very clean upgrade process and I can’t recommend highly enough ASP.NET MVC as a great application development platform.  The guys from Selenium also deserve a big mention as that tool provides me with a much better nights sleep.

Happy coding :)

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

ASP.NET MVC

Why original product ideas kill your small business

12. December 2008

Well this is a bit of a controversial idea but I’m a firm believer that original products and ideas for original products can be an accident waiting to happen… let me explain… actually it’s not really the idea for an original product that’s dangerous, it’s the fact that very often an established market does not exist for your product.

If you’re a small business start-up and you’re not planning on being the next Facebook (see my previous post for why you shouldn’t be trying to be the next Facebook) then you absolutely must have an existing market of people you can sell your product to. 

If you’ve created an entirely original product and if an established market doesn’t exist for you to easily enter then how are you going to get your product in front of people who want to buy? 

In a lot of cases they might love your product but if a market doesn’t exist for you to easily market to then they’re not even going to be looking for your product to solve their pain and therefore no sales. You simply must have an existing market for your product.

Let me illustrate this with an example…

In 1999 we released a software product that converted most document formats (Word, Excel, Quark, etc…) to HTML web pages so businesses could publish manuals, legal documents, charts, DTP documents etc to their Intranet or their web sites.  For 3 years we sold a good number of products but the marketing was horizontal and without a niche.  Then in 2002 we added PDF conversion capabilities to the software… this gave us a complimentary (massive, existing) market to push our tool into and the HTML conversion capability provided an excellent unique benefit that set us apart from the competition.

Suddenly we were growing about 20 - 100% per month for the following 2 years!  Wow I wish we’d known this when we started!

The point I’m trying to illustrate is that the original idea we had for an HTML converter was great and the tool really useful, but we didn’t have an easy way to get the product in front of potential customers that was within our budget.

Of course if you’ve got a sizable budget or you have VC (yuck) then this advice can be ignored and you have enough money to create a market if your product is good enough.

If you’re a small self-funded or revenue-funded business then I hope you can learn from our mistake… it’s a key part of the Success Recipe that is vital to small business success.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Online Business Success

What 99% of Small Business should be doing to succeed

11. December 2008

This is one video every single small business / SOHO owner should watch at least once.  It doesn’t matter if you know all this stuff already or if you’re already successful – this is a great motivational piece that spells out what 99% of entrepreneurs  should be focusing on.

David’ core message is: forget trying to be the next Facebook or MySpace… focus instead on choosing a niche market which has a real problem that your business can solve well.  Simply put, yours odds of success are far far higher.

David is an owner of 37signals, one of the most successful web 2.0 companies and their ideas and principals have shaped a lot of what we see today in the web SaaS (software as a service) type business space.  While this video is discussing technology businesses, the message is the same across the board – it doesn’t matter if you’re in real-estate or software.

Here is the link to the full-size original: David Heinemeier Hansson at Start-up School 08

<div><a href="http://www.omnisio.com">Share and annotate your videos</a> with Omnisio!</div>

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Online Business Success

Quick Tip: Add your logo to your invoices

2. December 2008

Here's another quick tip that we've been asked about quite a bit recently...

Did you know that you can add your business logo (or any image) to your nett30 invoices?  It's easy to do and your customers will instantly recognize your business branding.  Even better, you'll end up looking more professional.

Some guidelines for your logo images... 

1) You can upload your logo images (GIF, JPEG or PNG image format) from the Settings section of your nett30 control panel.
2) Logo images should be between 150 and 300 pixels wide and up to 200 pixels high.
3) Since invoices have a white background so should your logo image so that it blends nicely with the invoice background.

To upload your logo image, visit the Settings page then click on the Logos link and follow the instructions on that page.  It takes less than a minute to set this up so what are you waiting for?... Laughing

 

Currently rated 4.5 by 2 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Nett 30 Tips and Tricks , , , , , , ,