Saturday, 14 May 2011

Under your nose - uncovering hidden treasure in the tools you already use

At the recent STC meetup in Oxford Lisa Crispin performed a lightning talk on using an IDE to manage and edit your tests. Managing the files that constitute our automated test packs is not an easy process, particularly around the maintainence of these files in SVN, and I liked the idea of using an IDE to help the team with this. On investigating the potential benefits of using an IDE for our team, I was surprised to discover that actually, some excellent productivity benefits in a similar vein could be achieved by making full use of the tools that we were already using in the team.

False start


I already had IntelliJ and eclipse installed on my laptop for developing Java test harnesses and so my first inclination was to follow Lisa's suggestion of using one of these IDEs to manage the test files.

After thinking things through and experimenting with some ideas I realised that this was not really going to work for me and my specific context. The reason for this is that most of the time we develop our test packs on remote test servers not local machines. Although there are facilities for remote editing in eclipse, for example, this relied on services running on the target machines which would have severely diminished the flexibility of this approach. Many of the benefits of using such applications would also not apply to our context given the fact that our test file structure and format is specific to our harness and facilities such as dependency and syntax checking/auto-complete would not be applicable.

A different perspective


Although the idea of using a programmatical IDE appeared to be a non-starter for us, I still felt strongly that some of the benefits of such an approach could still help us if we could achieve them through other tools. On researching specifically the requirements that would directly help us to improve our remote interactive test development, I found that many of the features that I was looking for were available through addins or configuration options for tools that we were already using.

Custom file editing and svn management


On researching explorer tools with custom editor options I discovered that the Notepad++ tool actually supports a solid explorer addin Explorer. As well as file browsing there are also excellent file search and replace features. Combining with the icon overlay feature of tortoiseSVN and the support for the standard explorer context menu gives subversion integration.


In addition to the Explorer searching, the "OpenFileInSolution" addin provides indexing of the project file system for fast searching, and the "User defined language" feature allows me to add syntax highlighting for our syntax commands to pick up on simple syntax errors in command input files.

Remote file editor


Another item on the hitlist was the ability to edit remote files directly in an editor. I discovered another useful Notepad++ addin "NppFTP" that achieves exactly this. This presents a remote explorer window within the NotePad++ application that allows me to quickly access a remote directory and edit test files within my text editor.

Remote file management


Finally my search moved onto the ability to remotely manage files in SVN. Some googling around led me to this great post on Using WinSCP to work with remote SVN repositories. Again, WinSCP was a tool that we already used extensively in the team. Based on the hints available here I quickly established a custom toolbar in WinSCP to add, check status, check-out, check-in and revert files and directories using custom commands.

Custom file actions


Using the power of the custom command support in WinSCP has allowed me to progress further than I was expecting on the level of interaction with our test file packs. Custom commands have allowed us to create functions based on the common actions and bespoke file relationships that are unique to our test development environment. These operations include:-
  • Updating results files from test run directories into the corresponding source pack through a single button operation
  • Adding custom metadata files in for existing tests and test packs via a click and prompt operation
  • Copying existing tests with all associated meta files with a single click operation


All of these activities were obviously achievable through shell scripting, but the addition of simple commands in our remote scp client to perform these actions makes it a far simpler process to interact remotely with the test servers and work with our test pack files.

I know this is not rocket science, and I suppose in essence that is my point. We were already using both WinSCP and Notepad++ in the team, yet had not really investigated the power of the tools under our noses to make our lives easier. It was only through the process of looking for the benefits offered by other applications that I discovered the features that were already at my disposal.

Next time you fire up the tools that you use every day without thinking, why not take the time to have a closer look at how you can make them work harder for you.

Copyright (c) Adam Knight 2011

No comments:

Post a Comment

Thanks for taking the time to read this post, I appreciate any comments that you may have:-

ShareThis

Recommended