Forum Discussion

anbeek's avatar
anbeek
Occasional Contributor
14 years ago

How to get (current) project name?

Hi

In a groovy test step I need to get the project name.
Cant seem to get it though, tried with the below.

def test = context.expand( '${#Project#Name)' )
log.info(test) ---> Tue Mar 22 15:54:28 CET 2011:INFO:${#Project#Name)

Suspect that this is simple but I can't figure it out (tried a lot of variants on expansions).
Anyone who can point me in the rigth direction?

Regards
/A

2 Replies

  • anbeek's avatar
    anbeek
    Occasional Contributor
    Thanks

    But the "testRunner.testCase.testSuite.project.name" is just what I try to find a workaround for.
    Wont work when I start tests from 'outside' soapui (in batch script). Use it to start/stop mock's.

    But I need to dig deeper into my problem, I'm not sure I need to do it this way anymore.
    If I still have problems once the test strategy is in place, I will return with a new question

    Regards
    /Anders