Kategorien
Allgemein

QuickLinks for May 2011

Here a quick list of articles I´ve read during the last month:

Kategorien
Programming

Execute shell commands in Ruby

On Ruby Quicktips there´s a nice sum up of the three different ways how to execute shell commands from your ruby code. It´s explaining very well the differences between exec, backticks (or %x shortcut) and the system command: Execute Shell Commands

If you need more exhaustive info concerning the three possibilities, the article is listing three links to other resources on the web:

Kategorien
Testing

Agile Test Tools

On May 23rd, there was an event organised by the Luxembourg Testing Board, the topic was „Testing Tools“. One of the speakers was Stephane Louis who spoke about „Test Tools“ in general: He presented examples of different kind of test tools, and explained for what kind of tests to use that tool.

The other speaker was me, my topics was „Agile Test Tools“, here´s the abstract of the talk:

Still some kind of buzzword these days, „agile“ (and other related terms like „Scrum“ & „Lean“) are becoming more and more common used methodologies, you could say, that „agile has arrived in the mainstream“. But what is so different about agile software development? This presentation will try to give an answer at least for the subcategory of „Agile Testing Tools“.

The presentation will make visible the difference between testing in classical software development processes and in the agile (scrum) process. Main focus will be on how „the agile tester“ is beeing supported in his work by „Agile Test Tools“. According to different „mantras“ of agile software development like test-driven-development, acceptance-test-driven-development, behaviour-driven-development and others, several tools that support working according to these mantra will be presented and it will be explained how this tools work.

Concluding, the final essence of „Agile Test Tools“ will be presented and it will be discussed, how the agile tester is supported by this.
After that, it will be some room for questions & discussions with the audience.

The slides are available on Slideshare:

Kategorien
Allgemein Programming

MS SQL / T-SQL: Get a random date

Lately I needed to get a random date from an MS SQL Server, and it was a real pain to find something on google about it. Luckily I stumbled upon the blog of Ben Nadel who has written a great article about Getting A Random Date From A Date Range In SQL.

Kategorien
Programming

Ruby 1.9: Displaying a MessageBox Using the Windows API

On Ruby on Windows there´s a fantastic article on Displaying a MessageBox Using the Windows API. This working fine on Ruby 1.8, but unfortunately it is resulting in an error like this when being executed with Ruby 1.9:

message_box.rb:20:in `[]': wrong number of arguments(2 for 1) (ArgumentError)
   from message_box.rb:20:in `message_box'
   from message_box.rb:25:in `'

Luckily I´ve found a solution on the Ruby-Forum: Ruby 1.9.0 problem with DL.dlopen, in short, replace lines 20 + 21 of the example code by the following:

msgbox = DL::CFunc.new(user32['MessageBoxA'], DL::TYPE_LONG, 'MessageBox')
r, rs = msgbox.call([0, txt, title, 0].pack('L!ppL!').unpack('L!*'))

Kategorien
CEO Fun

AgileBorat at Twitter

Have a look at what @AgileBorat is writing on Twitter: https://twitter.com/#!/AgileBorat

My favorites so far:

My friend Azamat is very good developer, he is always have all unit test green. If unit test is fail, it is remove. Is best practice.

Azamat and Vlad has write new Defilation of Done. They say better something Done than nothing Done. CEO is hope for _anything_ Done.

Via @YvesHanoulle

Kategorien
Allgemein

CruiseControl.NET, Powershell and paths with spaces

Yesterday I included the execution of a Windows Powershell task into our CruiseControl.Net Buildserver in order to include the execution of some (more) tests into the build. I stumbled upon a posting of Vasily from QA Questions on how to do that: CruiseControl.NET: PowerShell tasks, otherwise I would have tried using the CruiseControl´s Exec-task to do it.

Before changing CruiseControl´s configuration I tried to make it work on the command line, just to go sure the Powershell script is doing what it is expected to do and found out that handling blanks in paths is a -bit- very weird when using PowerShell, but I found a solution described by Dave Donaldson at his blog: Running a PowerShell Script with a Space in the Path, which worked quite well for me.

But when it comes to CruiseControl.NET´s config-file, I still did not manage to execute the powershell script, reason is that there are two entries, one for the scriptpath and one for the script itself; so I´m not able to set the quotes correctly:

<tasks>
  <powershell>
    <script>myScript.ps1</script>
    <executable>C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe</executable>
    <scriptsDirectory>C:\my Directory\anotherDirectory</scriptsDirectory>
    <successExitCodes>0</successExitCodes>
    <buildTimeoutSeconds>60</buildTimeoutSeconds>
  </powershell>
</tasks>

One may argue that I just should place the Powershell script somewhere else, but I don´t like to use dirty workaround if there _must_ be a proper solution. And what if I´m not able to put it somewhere else?
What I´m using for now is to use the old 8-character directory name that was still common back in times of Windows 95, so in this case „C:\MYDIRE~1“. (To find this out, just execute „dir /x“ on the commandline). But I´m not very happy with this solution.

Any ideas/ proposals/ hints how to solve this properly? Thanks in advance!

Kategorien
TestTools

Usage of variables in FitNesse

Note to my self, usage of variables in FitNesse:

Definition:

!****> Global Variables…
!define VAR1 {aaa}
!define VAR2 {bbb}
*****!

!****< Hidden Global Variables... !define VAR1 {aaa} !define VAR2 {bbb} *****!

Usage:

| Something | ${VAR1} |