Shaaf's blog

A technical blog about Java, Kubernetes and things that matter

Getting started with JBehave in 8 steps.

This post is about JBehave and how to quickly get started with it. If you would like to know about BDD please use the following link. What is Behavioral Driven Development?

Today I have used JBehave for the first time. It does have some convincing factors for instance diving requirements into scenarios which map pretty nicely to the tests that are written with in the Steps. Thus it seems like it would be easier for Stakeholder/s to use it as a good guideline for the initial requirements. Its always quite usual to come up to some disagreements about the development however the tool does help to bring forth the ease for stake holders who really dont have to get into writing code but will have a technical jargon to communicate through to the developers in shape of scenarios.


Logging with log4J isDebugEnabled

Excerpt: Alot of times I have seen the questions popping up whether to use isDebugEnabled property or not. Arguably most of the times or rather always about performance. Some of the stuff that I feel important about using it follows.

Alot of times I have seen the questions popping up whether to use isDebugEnabled property or not. Arguably most of the times or rather always about performance. Some of the stuff that I feel important about using it follows.


Keep it simple, short and stupid (KISS)

everything should be made as simple as possible, but no simpler - Albert Einstein

I am sitting in a design room today designing a simple requirement for a client. He wants me to enhance the transfer money from one account to another. Just that it happens that I have my best friend Yuky sitting right next to me. He is damn good in Maths and extra ordinarily knows all the calculations on his tips. I am sure if I had asked him what was the angle of sight to the light on the wall he could just tell me in a few seconds looking with 10 eyes at his 12 fingers, trust me it will be correct.


Automation with Selenium,Junit, Ant

Much of the technologies above do not or will not need an introduction if you already know them or can read them from the links above.

More over today’s article is more about how we can use all the three selenium, ant and junit to come up with an automated solution for regressive testing.

Please refer to the documentation links above for the basic knowledge on any of the used tools.


Calling wsadmin scripts from ant

You can simply add the following to a target. For the following wsadmin should be in your PATH env.

< exec dir="." executable="wsadmin.bat" logError="true" failonerror="true" output="wsconfig.out" >
	< arg line="-lang jython -f ../../createQFactory.py"/ >
< /exec >

All output will be logged to wsconfig.out