eclipse-thingweb / node-wot

Components for building WoT devices or for interacting with them over various IoT protocols
https://thingweb.io
Other
161 stars 78 forks source link

External Testing #147

Open egekorkan opened 4 years ago

egekorkan commented 4 years ago

I think that for node-wot developers, it would be good to have an external test environment as well. I have created a Postman collection to test the counter example. I will improve it in the future but first I would like to have your opinions.

https://gist.github.com/egekorkan/a301f148311df69efb4c13e9e09a3989

You can simply import it and run as a Postman collection. The last one is listening to an event, for which you have to invoke one of the actions

danielpeintner commented 2 years ago

@egekorkan still valid?

danielpeintner commented 1 year ago

@egekorkan @relu91 is this issue still valid?

egekorkan commented 1 year ago

I think that it is still valid. This would actually help identify quite a bit of the bug reports I saw recently. A couple of curl requests that we maintain would be fine. Or the current HTTP tests can be extended with something on this direction? Yet another possibility would be to include this in the CLI tests or create a high-level end-to-end tests since these are not necessarily testing a single a binding but a Thing running on a servient which implies testing the core package as well.

relu91 commented 1 year ago

I think the best way to integrate it is to extend HTTP tests with a fully e2e test suite.

relu91 commented 9 months ago

In practice we should follow what we have done for MQTT: https://github.com/eclipse-thingweb/node-wot/tree/master/packages/binding-mqtt/test. In particular, https://github.com/eclipse-thingweb/node-wot/blob/master/packages/binding-mqtt/test/mqtt-client-subscribe-test.integration.ts