Skip to main content

Posts

Showing posts from 2017

Command Box and Jet Brains IntelliJ

My last post was about the new feature Testbox Watch which is in the latest version of Command Box. I wrote that it was probably a good idea to have two CommandBox windows open but with CB, my IDE, Photoshop, my project site, XKCD etc, the number of windows open is adding up quickly. For the last two years I've been using IntelliJ by JetBrains and recently discovered the concept of external tools but didn't really have one to use. I wondered if I could get rid of the "Testbox Watch" window in my previous post about that feature . My Folder Set up: root       runner.cfm       tests            test1.cfc            test2.cfc       testbox After a couple of false starts, some working but kludgy starts involving running .boxr files I came upon the following solution. Here is my package output from CommandBox: package show {     "dependencies":{         "testbox":"be"     },     "installPaths":{         "te

New Testbox Feature - Watch

This week, Brad Wood from Ortus Solutions posted a video to the company YouTube Channel ( https://www.youtube.com/watch?v=7k2vXl8FQ24&feature=youtu.be )  about some of the new features in TestBox and CommandBox. One was the improved reporting with Testbox from CommandBox and some of the options involved. The other was a brand new feature for CommandBox itself and its integration with TestBox: Testbox Watch. If you've never used watchers in other tools such as Grunt, the concept is simple. The program "watches" the files in the folder and, when one is changed, it responds in a pre-ordained way. This could be rendering it, running a script or, in this case, running your TestBox test suites. 1. To test it out you need to have the latest version of CommandBox. Open CommandBox type upgrade --latest You might get the message that you can't upgrade automatically but you will receive the URL to do it manually.  Install the latest version.  Open CommandBox to co

TestBox: Shooting for Test Reuse

For a recent project, I was trying to force myself to create unit and integration testing as part of the scaffolding. I had gotten to the point where my basic tests were moving along well and I was moving up the diagram from unit tests to integration tests. The basic project makeup is here: In working on the second tier cfcs (the image renderer, document render and the mesage renderer) I found myself starting to repeat some of the same tests again and again. The reason for this was pretty straightforward. All three of the renderers needed to return a struct with the same keys to the Decision Maker* so all three had a set of the same tests applied to them. This got tedious both to type out and the maintain as the needs of the structures morphed over time. Basically, the output from those and other other renderers that we'd develop in the future, needed to comply to an interface. All of them needed to have the same keys in the struct but the values would change based on the typ

Getting up to speed with TestBox

Over the past several months, I've been trying to work more habits into my workflow that make the coding product I'm creating better, more solid and done with a higher degree of confidence and less back and forth between myself and QA. One way that I've been trying to do that is by implementing some Unit and Integration Tests into my work flow rather than just simply "code and reload" and see if it worked. The idea is that we can run pieces of our code in place to see if the individual functions in our CFCs are working as expected and going from the bottom up to see if the entire process is working as we expect. Last fall at CFUnited, I took a training course with Ortus Solutions and discovered CommandBox and Testbox which have changed the way that I approach projects.  There are a number of ways to set this up but here is what seems to be working for me Prepping the environment Open up CommandBox and navigate to the root of your site. CommandBox isn't

Knowing Who Your Testers Are

I don't know about you but as soon as i get involved in a project I think I tend to treat people as if they are co-creators with me. This is great to a point until you start talking to people on the subway about your db design and eliciting their thoughts. Usually around then (or before this), they leave. I don't get invited to parties much. I love collaboration and teams. I'm a natural extrovert and need people to bounce ideas off and refine thoughts until I want them to go away and leave me alone to build what we just talked about. I really values the random access to colleagues (to a point) that comes from working in a team environment, especially after working for so many years as a "one person shop" However, last summer it was really hit home to me that you need to know who are your collaborators, who is your client, with whom you can co-develop with and who needs to be presented with a completed or almost completed product. In short, really assess to who