Define relative path in ORQA

Hi there,

Does ORQA have a function or parameter to define relative paths?

A use case of this would be when downloading jar files from URLs, they could be located under different path, e.g. d:\xxx\xxx\file.jar or /yyy/yy/yy/file.jar, under different systems. This location will be used lately when launching the jar files. Thus it would be better to use relative path instead of absolute path here.

Also, what functions can be used to determine which system a ORQA task is launched under, e.g. Linux / Windows / OS X / … ?

Thanks

Thanks for your questions

  1. Re relative path, yes that can be done. Use the Create File Reference operation. Like so:

044004ef15fec22810b7eacba16f0d7e491e3911

When you run that, the path variable will evaluate to (in my case: path = C:\Users\YOUR_USER\ORQA\Model\YOUR_PATH). You should then be able to to use the path variable for both the Working directory and for the XML reader.

  1. Re OS version: There is no operation for it You can just use

System.properties[‘os.name’]

ea490d5dc6440e9c13446cc88a436aaac13c3b62

In my case that evaluates to “Windows 8”. In Run Short Script operation you can enter any valid groovy/java expression.