Posts

Showing posts with the label Test

Selenium Test Automation with Maven

Today i want to help you manage your Automated GUI Tests (Selenium) better. In the past i have seen many different ways people handle this. Some people just write those plain HTML TestCases with Selenium-IDE, store it somewhere on the HDD and run manually when needed. Others dont even use Selenium-IDE. They write pure Java for Example, and automate their execution with JUnit. My todays solution lies inbetween. Precondition I want plain HTML TestCases, created with Selenium-IDE. So that someone with little Programming skills can still create them. I want these GUI Tests to be run automatically in my Build process, so my CI-Tool can notify me on errors. I also want all TestCases under Versioncontrol in my Projects Repository since the Tests grow with the Source. I want the most little effort with the highest outcome. So i dont want to export JUnit Tests out of my HTML TestCases since it would be kind of a Duplication - and i want to stick to the DRY Principle. Solution First of all i cre...

JavaScript Test Framewors: more than 30 + 1

After @szafranek hint and suggestion, wru landed almost at the end of this Wikipedia List of unit testing frameworks page. If you use this tweet size hand made imperfect script in the wikipedia page console: a=q="querySelectorAll",[].map.call(document[q](".mw-headline,.wikitable"),function(v,i){i%2?a=v.textContent:o[a]=v[q]("tr").length},o={}),o You gonna see that JavaScript is third when it comes to number of test frameworks ... and not sure that's good, anyway, here a quick description of mine. About wru You can find most info in github page itself but essentially wru is a generic purpose, environment agnostic, JavaScript tests framework compatible with both client and server, where client means every bloody browser, and server means Rhino, node.js, and recently phantom.js too. To be really fair, wru is not exactly a unit test framework since it does not provide by default anything related to mocks or stubs. However, wru is so tiny and unobtru...

Function.prototype.notifier

There are way too many ways to stub functions or methods, but at the end of the day all we want to know is always the same: has that function been invoked ? has that function received the expected context ? which argument has been passed to that function ? what was the output of the function ? Update thanks to @bga_ hint about the output property in after notification, it made perfect sense The Concept For fun and no profit I have created a prototype which aim is to bring a DOM like interface to any sort of function or method in order to monitor its lifecycle: the "before" event, able to preventDefault() and avoid the original function call at all the "after" event, in order to understand if the function did those expected changes to the environment or to a generic input object, or simply to analyze the output of the previous call the "error" event, in case we want to be notified if something went wrong during function execution the "handlerer...

I Would Simply Like To Support iPhone But I Cannot

Update Before other silly flame/blame will start, I have already twitted that my next laptop will be a netbook. Here the related tweet . let me summarize the story: at that time I had a girlfriend with an iPhone so I though why on earth shouldn't I buy an Android instead? If I need some test online I'll have both to test it , and I've rarely been that wrong. Wanna Develop for iPhone? Buy a Mac As marketing strategy sounds " cool " except I do not want to develop iPhone application, the present and the future is online, why on earth should I learn another programming language from the scratch, Objective-C, to develop something that will be relatively soon replaceable via WebKit and a good host? Wanna Develop Web for iPhone? Buy a Mac Again!!! Unbelievable, there is not such a thing: online iPhone tester , everything I found Googling was about a silly image with an iframe just to test the iPhone size ... are you kidding me ? It's like put IE inside an iframe ins...

[ES4] ... too horrible to be an editor ...

... but probably simple enough for these milestones. Its name is ES4me, it's for windows and works in this way: download the file in your es4 folder, where there is the run.exe and the es4.bat file double click Basically, there is a place to write something, where for some reason TABS are usable only with CTRL + TAB instead of single TAB key, a panel where errors or output will be showed, and finally, 5 buttons: Run, to execute the code Clear, to clear the code in the area Add Before, to add area code before execution Get Before, to add in area the code added before Clear Before, to clear content added before Here some example: var i:int = 123; print(i); Press Run, and You'll read 123 on output panel. Now press clear, and area will be without text. Write again ... var i:int = 123; Without the print, now press Add Before, area will be clean again ... BUT, write this: print(i); and press Run, you'll read 123 in the output panel. This mean that precedent code is in ram, and...