Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » String manipulation on local variables
String manipulation on local variables [message #723004] Wed, 07 September 2011 08:11 Go to next message
Niels K is currently offline Niels K
Messages: 17
Registered: July 2011
Junior Member
Hi,
I'm searching for a method to manipulate variables that I use in my test.
I read strings from a table and save them in variables during my test. Theese strings contain a numeric values and a unit (0.750 kg flour, 500ml milk...) and I want to use checkNumericValues on this variables. This means I have to remove letters spaces from the stored string.
I there a way to do this with the Jubula build-in methods?
Thanks,
Niels
Re: String manipulation on local variables [message #723224 is a reply to message #723004] Thu, 08 September 2011 01:29 Go to previous messageGo to next message
Achim Loerke is currently offline Achim Loerke
Messages: 325
Registered: July 2009
Location: Braunschweig, Germany
Senior Member

For the time being there are no string manipulation actions build into Jubula. You may be able to achieve some success with external commands, but this could become cumbersome if you have to use them often. In that case you should write a module to do these checks.

Achim
Re: String manipulation on local variables [message #843166 is a reply to message #723224] Thu, 12 April 2012 16:29 Go to previous messageGo to next message
Robert Barnard is currently offline Robert Barnard
Messages: 10
Registered: March 2012
Location: Sandy Springs, GA, USA
Junior Member
String manipulation would be a handy feature to have. I'm running into similar situations as well.
Re: String manipulation on local variables [message #843533 is a reply to message #843166] Fri, 13 April 2012 01:51 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1092
Registered: July 2009
Senior Member
It's possible that the option to use functions in the currently released standalone (1.2) may help. There is no function out of the box that will manipulate a string, but there is an extension point to write your own. If you are not using the new version in the standalone, then the functions capability will be available from Juno.

HTH,
Alex
Re: String manipulation on local variables [message #843578 is a reply to message #843533] Fri, 13 April 2012 03:01 Go to previous message
Alex St.
Messages: 4
Registered: April 2012
Junior Member
This would also be high on my wishlist. Although I am happy to be able to calculate now (btw: why is '?mult(2,3)' = '6.0' not '6'?), many thanks for implementing that, I would really appreciate to use string functions like strpos(), substr(), trim() and replace(). (Unfortunately I am not quite firm in Java ATM - so writing by myself would make noone happy...)
Previous Topic:Unable to Export a Test Project
Next Topic:Object mapping issue in libraries created in jubula
Goto Forum:
  


Current Time: Tue Jul 29 06:46:52 EDT 2014

Powered by FUDForum. Page generated in 0.02671 seconds