eclipse-uprotocol / up-tck

uProtocol Test Compatibility Kit
Apache License 2.0
4 stars 16 forks source link

Unify the Approach to Field Setting in Feature Files #25

Open agosh01 opened 7 months ago

agosh01 commented 7 months ago

Request is to standardize ability to set fields in feature files

e.g. Given "" creates data for "registerlistener" And sets "entity.name" to "body.access" And sets "resource.name" to "door" And sets "resource.instance" to "front_left" And sets "resource.message" to "Door" When sends "registerlistener" request And user waits "3" second Then the status received with "code" is "OK"

should use source and sink like

And sets "attributes.source.entity.name" to "body.access"
And sets "attributes.source.resource.name" to "door"
And sets "attributes.source.resource.instance" to "front_left"
And sets "attributes.source.resource.message" to "Door"
When sends "registerlistener" request
And user waits "3" second
Then the status received with "code" is "OK"
neelam-kushwah commented 6 months ago

@agosh01 The "register listener" method of uTransport takes a UURI input, consisting of authority, entity, and resource message. When setting the proto fields from the feature file, for the "register listener" method, the key would be "entity.name". However, for the "send" method, the key would be either "message.attributes.source.entity.name" or "message.attributes.sink.entity.name".

agosh01 commented 6 months ago

HI @neelam-kushwah This is more towards standardization of umsg creating in .feature file to improve readability for user. i.e. User will make UMessage format in .feature and for register listener wrapper we use sink/source uri from UMSG.