Page 1 of 1

Howto pass same parameter along rxrec, UserCodeCollection...

Posted: Tue Dec 19, 2017 1:06 pm
by _KK_
Hello Forum,

the help did not have suitable results for me to solve my task.

Dont know how to automate the following workflow with DataDriven Parameter using RecordModule, UserCodeCollection and UserCodeMethod in a RecordModule:

I am missing a mechanism similiar to "InsertNewModuleVariable" in UserCodeModule, but for UserCodeCollection/UserCodeMethod!

What has to be automated (the flow):
The UI has a "custom" keyboard (touch screen) which is using for user entries.
The value of this keyboard is written after completing in a chain along and at least into a "certain" register of a PLC.
The Automation has to verify that the proper value was really written into the PLC (read it out and compare it using Validation class of Ranorex).

The following Parameters should be considered to use as data driven test:
Name of the Register in PLC (e.g. IoPath)
Values to be entered (Keyboard "sequence" is not possible because the custom-keyboard is the bottleneck!)

Structure of the testsoftware (my approach so far):
- RecordModule ("addressid" based for Keyboard entries, one after one, eg. 2920333555,456 or xyz, -3666 etc.)
- UserCodeMethod to connect to the PCL
- UserCodeMethod to read out the Content of the Register from the PLC
- Ranorex Validation class for verification of the written value (inside the UserCodeMethod)


For testing with equivalence class the same Register has to be tested with Minvalue, Maxvalue etc.
The Name of the Register has to be taken out of e.g. csv-adapter for DataDriven tests.


Thanks in advance for any help (e.g. link to Rx documentation or code snippets).

BR

Klaus

Re: Howto pass same parameter along rxrec, UserCodeCollection...

Posted: Tue Dec 19, 2017 1:40 pm
by odklizec
Hi Klaus,

Maybe I'm misunderstanding something, but are you aware that you just need to create a user code method with an argument(s)? If you want to pass something to user code (from data connector), then all you need to do is to create a "string" argument, which must be associated with a module variable, which could be then connected to a test case/smart folder data connector. That's all.
UserCodeArgs.png

Re: Howto pass same parameter along rxrec, UserCodeCollection...

Posted: Wed Dec 20, 2017 7:54 am
by _KK_
Hi odklizek, thanks for the help.

I use Rx 8.0.0

Maybe I took the wrong way.
When I try to combine UserCode in Recordmodule, I do this with Add new action, UserCode
When there is no library Content, you cant select something (see screenshot).
So I visit the help and created a Collection with some usermethods (the one you can see in the screenshot).

I was not aware that I can create directly a method.
The thing is, when typing a name in you have to leave the line to get afterwards the possibility to create Parameter in that usercode (when you can create Parameters you can see the quotes (), see second screenshot).
It is only a small thing, but shit happens.

Now I have to make the Parameters running with DataSource in my chain (workflow).