It is very unlikely that I will be an admin for a TestLink install again for a while. This post is intended to put a period on my involvement in TestLink.
Category Archives: Software
Example TestLink XMLRPC Clients in Perl
There are not many good examples floating around of Perl clients for TestLink’s XMLRPC API. There are two examples included with the 1.9.3 source, but they are very brief. I wrote two scripts to support a first-blush attempt at automated test running, and while they will get a lot more refinement over time, I thought abstracted versions of them might be beneficial for others trying to write Perl clients (or in any language – they perl samples were so sparse I largely based my script on the python example).
Multiple Spaces After Period in WordPress
It’s bugged me for a while that my WordPress posts would often have an extra space at the beginning of a line. It would only happen when it was a new sentence, and after a while I realized it was related to my habit of typing two spaces after a period.
Missing TestLink API Function – getExecutionResults()
I have finally come to terms with the TestLink API and have bashed out an automated test runner written in perl (which I hope to clean up and post in the next few days, there don’t seem to be many (or any) examples of this in the wild).
After getting nightly automated testing running, I wanted a very simple script which would, for each test case in a given test plan, compare the last and the second to last result and print a warning if they were different. Long term I will have better automated reporting, but our test script library is still so new that it’s not really news that a lot of them are failing. What would be news is if a specific test case passed two nights ago but failed last night.
Expect scripts, [exec], and SIGCHLD
I had to debug an expect script that would not run in a specific environment today, and the solution was so frustrating that I had to write it down.
In short, expect’s [exec] functionality requires SIGCHLD to be functional to work correctly. If you have ignored the signal, you get a very nice explanation of why your script has just died. For instance:
Swaks Release 20120320.0 Available
Update 2018-11-06: If you came here because of the announcement about version 20181104.0, the wrong URL was used in the announcement. The correct location for the new release is https://www.jetmore.org/john/blog/2018/11/swaks-release-20181104-0-available/
A new version of swaks is currently available for download.
Downloads:
- Project Page: http://jetmore.org/john/code/swaks/
- v20120320.0 distribution: http://jetmore.org/john/code/swaks/swaks-20120320.0.tar.gz
- v20120320.0 script only: http://jetmore.org/john/code/swaks/swaks-20120320.0/swaks
- v20120320.0 reference: http://jetmore.org/john/code/swaks/swaks-20120320.0/doc/ref.txt
- v20120320.0 changelog: http://jetmore.org/john/code/swaks/swaks-20120320.0/doc/Changes.txt
Commented SQL, Named Parameters, and PHP’s PDO module
I can’t include code in this post because I don’t own it, but I think I can discuss the concept, which I found really interesting.
A coworker had the idea to extend the PDO prepare()
method to aid in debugging. I’m not sure if he implemented something he found on the net or it was an original idea, but I really like the results. It prepends, to every query executed, an SQL comment (ala “/* comment */
“) including the username of the logged in user and the URL of the current request. This usually makes no difference, but if you’re in a really tough spot in debugging you can turn on mysql general_log, run the session that is having problems, and easily see every query that the was executed on behalf of the user having problems.
Swaks IPv6 Support – Initial Draft
I’ve put together an initial attempt at IPv6 support in swaks. If this sort of thing interests you, please take a look at what I have so far and let me know what you think.
LINK REMOVED – this was a development release and the changes have been incorporated in official releases. Please see the project home page at http://jetmore.org/john/code/swaks/ for the latest release.
There is no documentation included yet, but the only real change to the documentation is the addition of the -4 and -6 options to force IPv4 or IPv6. There are a few unrelated tweaks since the last release, but nothing that needs documentation at this point.
TestLink 1.9.3 API Documentation
I have not been able to find any up-to-date documentation on the TestLink XMLRPC API online. The best I could find was phpdoc output from 1.8.x located at http://www.teamst.org/_tldoc/1.8/phpdoc_api/. The actual content of that page was pretty helpful, just out of date. Today I returned to trying to work with the API and decided to figure out how to generate the same document format for the 1.9.3 code. I’m placing it online in case anyone else had the same issue I did.
About The Name Swaks…
I began developing the tool that would become “swaks” on December 19, 2001. The initial version was mostly just an adapted version of the sendpage my coworker Jamie Hill had written for simple SNPP transactions. At that time the tool was called “vmail”, which meant something like visual- or visualize-mail.
On November 11, 2003, I posted a link to vmail on the exim-users mailing list. I received lots of constructive responses, including one note that the name vmail was very generic, and also in use by another project (I wish I could remember who noted that, but I can’t find it in the mailing list archives).