Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT Tests #20

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

mjacoby
Copy link

@mjacoby mjacoby commented Aug 9, 2016

This pull request implements the tests for receiving updates via MQTT as described in the SensorThings API specification including

  • Subscribing to an entity set while inserting (POST) and updating (PUT, PATCH) entities for each entity type
  • Subscribing to an entity set with multiple selected properties while inserting (POST) and updating (PUT, PATCH) entities for each entity type
  • Subscribing to an entity set using different topics while inserting (POST) and updating (PUT, PATCH) entities for each entity type
  • Subscribing to an entity while updating (PUT, PATCH) it for each entity type
  • Subscribing to an entity using different topics while updating (PUT, PATCH) it for each entity type
  • Subscribing to a property of an entity while updating (PUT, PATCH) it for each entity type and each propery (exlucing navigation properties)
  • Subscribing to multiple entity set while doing a deep insert for every entity type possible

Two new properties were added to the properties file

  • mqtt_server defines the address of the MQTT server
  • mqtt_timeout defines the time in milliseconds a test case waits to receive an MQTT message

@bertt This might be of interest for you as you were interested in further tests #6

mjacoby added 3 commits August 9, 2016 15:13
# Conflicts:
#	pom.xml
#	src/main/resources/test-run-props.xml
* removed priority of test cases
@bertt
Copy link
Contributor

bertt commented Aug 16, 2016

👍

@mjacoby mjacoby changed the title MQTT Subscribe Tests MQTT Tests Aug 17, 2016
@mjacoby
Copy link
Author

mjacoby commented Aug 17, 2016

Added tests for creating observations via MQTT

@taniakhalafbeigi
Copy link
Contributor

We are going to wait for the API change request before reviewing this pull request.
Just a quick comment, MQTT Server should be provided by the user.

@mjacoby
Copy link
Author

mjacoby commented Sep 23, 2016

Could you please explain at bit more in detail what you mean by "the MQTT Server should be provided by the user"?

@taniakhalafbeigi
Copy link
Contributor

Currently we only get the service URL and level of test from user. For MQTT test we need to get MQTT broker address from user too. I am talking about the page that is the user interface when the project is deployed on TEAM Engine.

@mjacoby
Copy link
Author

mjacoby commented Sep 26, 2016

I understand what you mean. My version committed here reads the broker address from the config file as I don't know anything about the TEAM Engine.

@taniakhalafbeigi
Copy link
Contributor

Okay, then I will fix that part of it. But lets wait a little bit for the change request.
Just if you are curious, the ctl file under /src/main/scripts/ctl/ needs to be modified. I haven't review the code I just saw this file is not in modified files list, so I am not sure if more modification is needed based on the change in ctl.

@bertt
Copy link
Contributor

bertt commented May 17, 2017

How can I build this test? mvn package gives build failure after: '[WARNING] The POM for org.eclipse.paho:org.eclipse.paho.client.mqttv3:jar:1.1.1-SNAPSHOT is missing, no dependency information available'

@hylkevds
Copy link
Contributor

The paho version can be updated to 1.1.1 (without -SNAPSHOT)
I'll update the pull request later this week.

@hylkevds
Copy link
Contributor

I've updated the pull request to the latest version of the test suite.

@bertt
Copy link
Contributor

bertt commented May 29, 2017

thanks, can build and run now :-)

@bertt
Copy link
Contributor

bertt commented May 29, 2017

Q: why are you using the 'MQTT_TOPIC_PREFIX' (v1.0/) in the MQTT topic? It's not defined in the spec.

@hylkevds
Copy link
Contributor

Hmm, if it's not in the topic, how is the server going to know which version the client wants?

@bertt
Copy link
Contributor

bertt commented May 29, 2017

ok thanks, so its a proposal to put version number in the MQTT topic, good point.

@hylkevds
Copy link
Contributor

Yes, but if it does not get accepted, it's just a matter of leaving the prefix empty. It should probably not be set by default, since it's not actually an accepted change.

I'll change the prefix to empty in the pull request.

bertt and others added 3 commits May 30, 2017 12:31
change encoding/type of sensor from 'http://schema.org/description' to 'application/pdf' (same encodingtype as used in other tests)
Update EntityHelper.java, fixing used encoding types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants