end2end™ Acceptance Test Automation using Fitnesse, Webtest, Selenium and Jenkins.
That's a lot of words but basically this is how it works.
FIT (Framework for Integrated Test) is a tool for acceptance testing which reads tables inside excel and HTML (Hyper Text Markup Language).
The stuff you put in the tables are pointers to code with commands read by FIT along with input and output data that executes against the System Under Test (SUT).
In other words, code runs the tests structured in table.
Fitnesse is a wiki based testing tool which internally uses FIT and makes test code sharable, accessible, easier to maintain, and you don't have to keep track of a bunch of html or xml files.
The wiki syntax | saves time from having to write HTML table markup. Really underneath Fitnesse translates that to tables but saves us time from having to do that.
Fitnesse runs from your web browser and is extensible meaning you can write plugins for it.
Fitnesse plugins are created using code and are called fixtures. For example Webtest is an example of a Fitnesse plug-in.
Fitnesse Plug-in vs Fitnesse Test
When you write a reuable fixture you are writing a plug-in.
When you write a non reusable fixture you are writing a test.
Fitnesse can be run in 2 ways.
You can write non re-usable plug-ins or tests, coupled to your code which is somewhat useless because JUnit can run code couple to code all ready.
Sure this can be useful to not hurt the Business Analyst eyes so they don't have to look at code and see structured tables instead, but really you are just adding another layer of complexity.
And although this is a selling point for fitnesse and cucumber, do Analyst really look at this stuff?
When you use Fitnesse coupled to code, you have to code a fixture for each test, and that takes more time to code and maintain.
You also need to share your code with the people testing it which may be a security concern.
And you now require testers to have coding skills which can hurt the brains of good testers lacking coding skills.
This is also a code smell of Fitnesse (Slim) also found in Cucumber, and to get all of this to work, you now need a Test Architect since you will need to use design patterns such as Page Object Models to get it to scale properly.
This is great because it creates more work for Developers and Test Architects but in the end may end up costing you more money.
Decoupling from code
By running Fitnesse decoupled from your code, and using Fixtures as plug-ins, testers can test from anywhere without needing access to code and you only need to maintain one fixture that can be used to test all of your code.
Selenium can be run in several ways
Selenium (the cure for Mercury poisoning) is a great tool for browser automation and is the open source alternative for QTP made by Mercury.
Selenium has 3 core parts. Selenium IDE, Selenium RC and Selenium Webdriver.
The Selenium IDE is a Firefox browser plug-in used to help you identify the element names on the webite you are testing.
Selenium RC is a proxy that tells the browser what to do, basically you tell it what to do, and it tells the browser what to do using selenese which is written in Javscript.
Selenium Web Driver is more focused on driving the specific browser. So you have a Web Driver for each browser. Running Selenium coupled to code will also suffer the same code smells as mentioned above.
You hear people say UI tests are brittle, and it's true.
Tests breaking due to browser quirks was the purpose for creating WebDriver.
So naturally some people will rather Selenium WebDriver over Selenium RC.
In my opinion you don't have to automate every page on every browser.
Just automate your pages on one browser, Firefox and done.
The key and secret to keeping your automation running is using the KISS principle.
Keep your automation simple, after all we're just checking functionality.
It it works in Firefox, you can assume it works in other browsers.
We can even use BDD for this.
Given that my automation runs on Firefox, When we use other browsers, Then it will also work.
And if not, Then fix your code to work in the other browser, manually test it, and run your Firefox automation suite!
Anyway that's my humble opinion.
Webtest is a Fitnesse Fixture Plugin that help run Selenium from Fitnesse.
It was created before Web Driver, so it was made to run against the Selenium Remote Control
and I think it was created by the same guy in the Cucumber book.
When you tie all these things together, you can make really cool automated web tests.
As you can see there is more than one way to do it but this is my favorite way.
Once you create automated tests, your going to want to automate your automation.
For that you can use Hudson or Jenkins and install the plugin for Fitnesse in Jenkins.
And once your suites starts to grow add the Selenium Grig Jenkins Plugin.
Below I added some screen shots of testing walkietalkie.us website, with the tools described above. Since I had done this sort of integration before,
it did not take me too long to set it up. By the way, since you are testing end to end as explained in Selenium Grid video, from UI to database and back.
I named this setup end2end™ and systems such as this have been referenced as next gen testing. Just about everything I have created has been coined next gen. For example.
http://check1two.com Next Gen Jukebox. IRingItUp http://iringitup.com Next Gen Ordering System, and http://walkietalkie.us Next Gen Walkie Talkie.
Happy testing, and if you need someone to set this up for your organization, you know who to call. MIT Technologies Vet Biz Certified company by Manuel Ignacio Tijerino (MIT).
Home Page Test
About Page Test
Why Choose Us Page Test
Download Page Test
Contact Page Test
Jenkins Fitnesse Results
Jenkins Test Details