Elliott's Blog | Life Through Math, Algorithms and Code

Sep/10

27

ColdFusion Server Test Suite (CFML2009)

Today I’m excited to release the ColdFusion CFML2009 Core Test Suite. The test suite is far from complete, but it generally covers most of the basic language level and syntax features. If you’d like to contribute more tests please checkout the code and submit a patch.

I’d encourage anyone who uses ColdFusion to download this test suite and run it against their server every time they update with a hotfix or to a new version. It’ll expose many language bugs and regressions before your application code does.

Note this isn’t following the official CFML2009 standard since that was never released, but instead follows the ColdFusion language as it existed in the year 2009.

No tags

6 comments

  • Mark Drew · September 27, 2010 at 2:45 pm

    I was running these on the latest version of Railo, and some tests didn’t pass, so I looked at them in some detail… I am not questioning much except this practice:
    snip:
    foo = “abc”;

    variables.foo.bar.test = test;
    :snip

    Wait, so we set essentially variables.foo = “abc”; and then it is accessed as a struct? Not only that we want to add keys to it without creating them first too? What happened to “abc”?

    I think this would be more of a bug surely?? just because it works, doesn’t mean it’s right does it? if one of my developers did this, just because it worked, they would still get a smack round the back of their head.

    Good call on doing these tests though,

    Reply

    • Author comment by Elliott · September 28, 2010 at 1:17 am

      @Mark

      That is how Adobe CF handles variable reassignment. If a variable already exists and you reassign with a chain it creates structs for the entire chain. Your personal style shouldn’t mean anything to what the language supports. You may not like it, but I know lots of developers that depend on that behavior in CF, and if CF9.0.2 broke it that’d be really bad.

      Railo doesn’t currently implement this behavior, but there’s no performance hit with creating missing struct keys instead of throwing exceptions.

      All that said, I’ve refactored the tests to test that behavior separately. This testsuite is about exposing language regressions or glaring holes in support, like Railo not supporting the dollar sign in function metadata names or Adobe evaluating expressions in the wrong order. I’m very open to splitting tests apart to smaller ones based around runtime support. You’ll notice there’s already a special test for function collisions in Railo vs Adobe CF.

      Please do submit more tests too!

      Reply

  • Brandon Moser · September 27, 2010 at 7:28 pm

    So, when you say, “follows the ColdFusion language as it existed in the year 2009”, does that imply ColdFusion 9? I tried running the test suite on CF8 and received a stack of failures.

    Reply

    • Author comment by Elliott · September 28, 2010 at 1:22 am

      @Brandon

      Yeah it’s targeted at CF9+, so 2009 is a little misleading I suppose since CF9 was released so close to the end of it, though I guess there was a CF9 public beta for half the year. If you want to add tests that target CF8 behavior please do! Regressions from CF8 to CF9 are really bad, and should be tested too.

      Reply

  • Brandon Moser · September 27, 2010 at 7:29 pm

    On another note, I think this is a great project and really hope to see it flourish in the community. Thanks Elliot.

    Reply

  • Adam Lehman · September 28, 2010 at 6:15 pm

    Cool beans. I had our QE team add this to their regression tests.

    -Adam
    ColdFusion Product Manager

    Reply

Leave a Reply to Elliott

<<

>>

Theme Design by devolux.nh2.me