What's concordion:params for ?

99 views
Skip to first unread message

Leo Antoli

unread,
Oct 20, 2014, 4:46:48 AM10/20/14
to conco...@googlegroups.com
Hi, 
Eclipse concordion plugin suggests concordion:params as one of the possible HTML attributes but I can't find any documentation about it.   What is it for ? is it deprecated?

Thanks a lot.

Regards,
Leo

Nigel Charman

unread,
Oct 24, 2014, 4:23:45 PM10/24/14
to conco...@googlegroups.com
Good question!

concordion:params is an attribute for the concordion:run command (see the code here). It was introduced in the initial commit of concordion:run in 2008. However, there is no documentation or even any tests for it. I can't understand how it is supposed to work, since it calls the evaluator to evaluate the value, but doesn't assign the result.

Further down in the run command there is a mechanism for passing parameters to setter methods of the runner, which looks more complete.

I'd be keen to hear if anyone is using concordion:params? It's interesting that the Eclipse Concordion plugin includes it as an option. It probably should be deprecated.
--
You received this message because you are subscribed to the Google Groups "concordion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to concordion+...@googlegroups.com.
To post to this group, send email to conco...@googlegroups.com.
Visit this group at http://groups.google.com/group/concordion.
To view this discussion on the web, visit https://groups.google.com/d/msgid/concordion/0023f544-73c3-40cb-bca2-ccdd05806fcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nigel Charman

unread,
Sep 11, 2015, 5:44:52 PM9/11/15
to concordion
I just got concordion:params working in response to a question on Stack Overflow.

MyIndex.html:

<a concordion:run="concordion" concordion:params="foo=5" href="MySpec.html">My Spec</a>
MyIndex.java

@RunWith(ConcordionRunner.class)
@FullOGNL
public class MyIndex {
    public void setFoo(Integer foo) {
        System.out.println("foo = " + foo);
    }
}

Note that the @FullOGNL attribute is required to allow the syntax foo=5 in the expression that wouldn't otherwise be allowed.

I've reached out to the original developer to see if this is the intended usage. I'm not sure it's what would be wanted since it's setting the value on the index specification rather than the specification that is being run.

Tim Wright

unread,
Sep 11, 2015, 7:13:32 PM9/11/15
to Nigel Charman, concordion


Hey,

I think we need to tread carefully with params on concordion:run. 

The issue I see is that the same specification might be run from two different specifications (or run twice from a single specification) with different parameters as well as from jUnit with no parameters. As we only create one HTML file, the behaviour might not be what the user expects. It also means that using concordion:run will create a different specification from running the spec directly as a jUnit test - which is something we've tried hard to avoid.

The current behaviour (with the concordion run cache) is that the first one to be called will create the HTML file - and the second one will return a run results from the cache thus ignoring the parameter.

I have no problem with params on a run command influencing how the results are reported to the calling spec (like unimplemented, etc), but having the run command change the spec seems like it could take us to an inconsistent place.

Tim


--
You received this message because you are subscribed to the Google Groups "concordion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to concordion+...@googlegroups.com.
To post to this group, send email to conco...@googlegroups.com.
Visit this group at http://groups.google.com/group/concordion.

For more options, visit https://groups.google.com/d/optout.

Nigel Charman

unread,
Sep 11, 2015, 7:45:11 PM9/11/15
to Tim Wright, concordion
Good point Tim.

It might be worth considering how this would be implemented. If via a different mechanism, we should deprecate the current behaviour and remove in 2.0.

Note that concordion:run does allow alternate runners to be used, which could potentially write specifications with different parameters to different output locations.

Is anyone on this list currently using concordion:params?

Does anyone have use cases where it might be useful?

Nigel.
Reply all
Reply to author
Forward
0 new messages