Return Proper Exit Code, One Must

While working on functional tests for tlslookieloo I discovered that it’s not returning an error exit code when it exits because of a configuration issue. This oversight would make it difficult to use tlslookieloo as part of automated testing.

Unit tests are great in making sure that a component is behaving as it should; however, it doesn’t provide the ability to test the usability of the software. This is the domain of functional testing. In tlslookieloo, I use Robot Framework. Functional tests should have been in place since version 0.1.0; but alas, that wasn’t the case. Hence, the glaring oversight with tlslookieloo’s incorrect return code.

I uncovered the issue while working on the 1st functional test case. What happened was I specified a path to the records file to a directory that didn’t exist. Since tlslookieloo couldn’t create the record file the target handler terminated, which then terminated the tlslookieloo. However, the current design didn’t factor target handlers terminating on its own because of an issue. This then lead to the “client” process to report that it couldn’t connect to tlslookieloo; but, the test script didn’t properly report that tlslookieloo didn’t actually start properly. I eventually found out the root cause by manually running tlslookieloo the same way that the test script does.

As of this writing issue #17 is open. I plan to resolve the issue once I’ve completed creating the functional test suite for tlsloookieloo. See commit bd05134 for the functional test case that surfaced this issue.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.