Afterthoughts - Summer of Testing (and Tasting!)

Guess what? It was shady again.
In this post I'll go through some highlights of our testing themed Geek Collision. We covered things like unit and acceptance testing, automated accessibility testing and fuzzing. There was a nice little war story too. So something for everyone!

Overall it was great fun and we managed to cover a variety of topics. It definitely gave some extra perspective for those that attended.

At peak there were around fifteen people, a record of sorts I think. Thanks for attending!

Tuukka Turto - pyherc

Tuukka Turto showed us how he tests pyherc, a NetHack lookalike of his. You could say he has the thing covered. Besides unit tests you'll find at least acceptance and UI tests in the project.

Through testing make it possible for him to keep the ball rolling. To quote Tuukka it enables him to get back to flow after interruptions. He plans to write a web based user interface for the backend. Perhaps we'll see a MMORPG version of pyherc sometime in the future? By the way, pyherc comes with a vintage mode already just so you can relive those golden NetHack memories.

If you want to know more about the project, check out Tuukka's interview at Five Hour Projects. That should give you more insight on what he does, why and how.

Asko Soukka - Automated Accessibility Testing

Asko Soukka gave us an overview on how he tests user interfaces built with Plone. He demonstrated how to use Robot Framework to build tests executable in browser. Furthermore it was possible to get video output and individual screenshots. The most impressive thing, no doubt about that, was the way he had integrated the purposes of documentation with testing.

It is possible to use the screenshots given by the tooling in your user facing documentation. This way your tests and documentation will stay always in sync as the workflows change. How neat is that?

Even better he had integrated Wave Toolbar as a part of his automated testing workflow. In this case the screenshots contained additional information highlighting various issues detected by Wave Toolbar. Rather than having to run the tool yourself this automation makes it fast and easy to get the feedback as you developed.

Do keep in mind that you cannot automate accessibility testing fully. A real person is always required. The main point about this sort of tooling is that it raises the bar higher and allows developers to reach better initial results before tweaking further.

You can find more information about Asko's accessibility testing workflow at his blog.

Tero Tilus - a Tale of Two Codebases

Tero Tilus told us a story of a recent case he was involved in. It was a project with two distinct codebases for frontend and backend. Latter of these was well tested whereas the former was not before Tero got his hands on the project. Guess which part is going to receive some sort of a rewrite?

Dimensions of Testing

Tero also explored the dimensions of testing. It is very easy to have a narrow view on testing. There's more to it than just unit testing, TDD, acceptance testing, whatnot. It is simple to forget about qualitative testing. This includes aspects such as usability, user experience, robustness, code quality and performance. Some of these can be tested using hardware but some aspects require human effort.

It is possible to enforce some of these qualities by using the right development practices. You can, for instance, affect code quality by introducing peer reviews. If you have the right kind of process in place, quality will follow (or will it?).

Testing Maturity

Tero discussed Beizer's five levels of testing maturity. It is more about how view the purpose of testing. Unfortunately it is very hard to provide that code is correct. We can, however, try to minimize the effect of this through various ways. Of course we can ignore the whole thing and just "cowboy" it. Or we can be conscious about it and try to do something about it. That's where that testing maturity thing comes in.

Juho Vepsäläinen - Fuzz Testing

As I saw Tuukka speaking about Python testing I could not help but to showcase a couple of my approaches to Python testing. Namely documentation driven testing and speccer. The latter one is a DSL of sorts that "solves" the problem of unittest module. It is a module derived from Java. Let's just say it's a very verbose way to write unit tests. And I prefer brevity myself.

speccer

That is the reason why I wrote speccer. Implementation-wise it just generates unittest code and uses its test runner even. Some of the implementation details are a bit sketchy but in principle you may mix regular Python code with it. The slides below should give you a better idea.



The real beef of my bit had to do with JavaScript. It's something I've been dabbling with during the past few years. During this time I've developed some solutions of my own (talk about NIH). The first one I showcased briefly was bunit.js. It is something I developed because I didn't like the syntax of QUnit. Again, too verbose and not AMD compatible (at the time anyway).

suite.js

After a while bunit.js started to feel verbose too. So I went to the absolute minimum I could think of and came up with suite.js. Its primary concept is a test suite. It executes a set of units (individual check) for the function provided to the suite. I guess the syntax might look a bit weird at first. It is extremely powerful for small scale unit testing, though. The slides below explain the basics.




As I developed suite.js I started to think about test automation. Wouldn't it be neat if it was possible to generate those units? This lead me to the world of fuzzing. I simply wrote something that generated units based on some simple generators and an invariant to be tested. The syntax wasn't that nice on retrospect but at least it was a start.

Fuzzing

In order to overcome this syntax problem I decided to split the problem in two. I moved half of the definition to the function level and leaving the invariant part to the external test. This seems to be the sweet spot for me. In addition I get runtime checks which isn't a bad thing. As I don't want to drag this blog post further, have a look at a small fuzzing demo I have developed. It gets to the gist of it.

I'm still in the middle of wilderness with this thing but at least I feel like I'm going to the right direction. The audience raised some good points about improving the methodology by making it deterministic (not purely random like now) and checking certain border conditions to improve the test coverage. His thoughts on generating permutations based on these conditions were very interesting as well.

Conclusion

I think it was really nice to have a themed Geek Collision such as this. It provided a way for people to showcase some of the technology and solutions they use in practice. This way it fostered interchange of ideas and perhaps lead to some new development. I definitely would not mind participating in these sort of events in the future. I hope you think so too.

Speaking of future events, remember the Battle of Web Frameworks held at 16th of July. We plan to provide a specification people can write their participating entries against. It's not meant as a serious competition but rather as a way to learn something more about technology. So even less than perfect entries are allowed.

25 comments:

Nicky Paul said...

iFlyChat is an ongoing talk module most appropriate for group and long range informal communication sites. It helps in expanding client engagement of your WordPress site by empowering clients to visit with each other secretly (balanced private discussion), bunch talk or in talk rooms
Wp Chat

Dhivya Shree said...

In India thenumber of smartphone users have been on a rise. Among them also the people using android is way to high. Being an android developer would be the dorrect career choice.
Android training in Chennai | Android course in Chennai | Android training institute in Chennai

Rose Angel said...

Nice useful article for small businesses like us. thank you so much for the detail information.Gorilla Online Marketing

Chinni Bocha said...

nice blog of tasting..
Best SEO training in hyderabad all modules are clearly solved and practice with guide.seo training in hyderabadAnd clearly getting knowledge of seo.

Vasu N said...


Thank you For tutorials on Testing and the also the other tutorials on Blog are Awosme, It will be Most Usefull For Fresher and Students on interview questions
salesforce training in hyderabad


Madhu Manohar said...

Useful Information
one and only affiliate agency in south INDIA, earn money online from affiliate network in india

Venky Praise said...

Freshers jobs way provide freshers jobs ,walkins,direct recruitment,openings for freshers and experienced and recruiting experienced and freshers Walkins

Chinni Bocha said...

Excellent posts..

SAP HANA

training

Chinni Bocha said...

Useful information..

SAP GRC training in hyderabad


prema said...

useful information

Online recruitment for bank jobs and government jobs and you can get Notification and application to apply

online for bank jobs and govt jobs

prema said...

Useful information:
General Awareness and Current Affairs with Latest Current Affairs Quiz, GK Updates, General Knowledge Last 6 Months Current Affairs, Placement Papers, Model Papers, Interview Questions @ examvalue.com

prema said...


useful information

Online recruitment for bank jobs and government jobs and you can get Notification and application to apply online for bank jobs and govt jobs

telugu70mm Movies said...

Nice Blog

Telugu70mm.com Provides Latest Telugu Movie Reviews , Telugu Movie News and Other Latest News

balu said...

Useful Information……
Recruitment voice contains Daily GK Updates, Bank Recruitment, Government jobs, Bank jobs, Interview Tips, Banking News, GK Updates Bank Recruitment

Balusomu said...

Nice Information:
Telugu Cinema Contains Telugu Cinema News, Latest Movie Reviews, Actor, Actress, Movie Galleries And Many More Telugu Cinema News

telugu70mm Movie News said...

Helpful Information

Telugu70mm.com Provides Latest Telugu Movie Reviews , Telugu Political News and Other Latest Telugu Movie News

Unknown said...

Helpful Information:

Telugu Cinema Contains Telugu Cinema News, Telugu Movie Reviews and many more @ http://www.telugucinema.com/

Priya R said...

Great content thanks for sharing this informative blog which provided me technical information keep posting.
Selenium Training in Chennai | Selenium Testing Course in Chennai

swapna said...

Nice Information

New Year 2017 - New Year 2017 Images Happy New year

Wishes 2017, Happy New Year 2017, New Year Wishes, New Year Greetings

swapna said...

Nice Information

Merry Christmas Santa Gifts - Merry Christmas Images

,Christmas Images, Merry christmas pictures, Merry Christmas Images Free Download

keerthi reethwika said...

Its really helpfull.., thanks for sharing this.

Papa jobs Providing latest information about Current affairs, Bank Recruitment, Government jobs, Bank jobs, IT jobs., check this link papa jobs i hope this is very use full to you and all the very best Guys.

priyanka kamineni said...

Nice information for job seekers. Thanks for sharing the awesome information , i also recommend online Notification

priyanka kamineni said...

Very Good Information and i also recommend Freshers job way ; as they are leading sites provides job information

priyanka kamineni said...

Thanks , you are giving very important information for many job seekers. In my experience , i got job through Recruitment Voice and according to me it is also one of the best site.

Gopi said...

Great efforts put it to find the article about selenium, Definitely will share the same to other forums.
We are also one of the best sources to learn Selnium -Selenium training in Chennai |Best Selenium training institute in Chennai

Post a Comment

 
Copyright © Geek Collision