Projects tigase _server tigase-pubsub Issues #63
PubSub REST API - create tests (#63)
Closed
wojciech.kapcia@tigase.net opened 8 years ago
Due Date
2016-12-01

Create tests for JSON

Andrzej Wójcik (Tigase) commented 8 years ago

I've added test cases for JSON and added missing test for XML. Now I think PubSub REST API is properly covered with test cases.

wojciech.kapcia@tigase.net commented 8 years ago

Directly executed tests, i.e.: mvn -Dtest=tigase.tests.pubsub.TestRestApiUsingJSON test and mvn -Dtest=tigase.tests.pubsub.TestRestApiUsingXML test yield success

Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.832 sec - in tigase.tests.pubsub.TestRestApiUsingJSON
createNodes(tigase.tests.pubsub.TestRestApiUsingJSON)  Time elapsed: 1.365 sec
createSubnodes(tigase.tests.pubsub.TestRestApiUsingJSON)  Time elapsed: 2.236 sec
configureNodes(tigase.tests.pubsub.TestRestApiUsingJSON)  Time elapsed: 0.001 sec
subscribeNodes(tigase.tests.pubsub.TestRestApiUsingJSON)  Time elapsed: 0.849 sec
publishItemsToNodes(tigase.tests.pubsub.TestRestApiUsingJSON)  Time elapsed: 0.027 sec
retrieveItemsFromNodes(tigase.tests.pubsub.TestRestApiUsingJSON)  Time elapsed: 0 sec
retrieveUserSubscriptions(tigase.tests.pubsub.TestRestApiUsingJSON)  Time elapsed: 0 sec
retrieveUserSubscriptionsWithRegex(tigase.tests.pubsub.TestRestApiUsingJSON)  Time elapsed: 0 sec
retractItemsFromNodes(tigase.tests.pubsub.TestRestApiUsingJSON)  Time elapsed: 0.001 sec
unsubscribeNodes(tigase.tests.pubsub.TestRestApiUsingJSON)  Time elapsed: 0.953 sec
deleteSubnodes(tigase.tests.pubsub.TestRestApiUsingJSON)  Time elapsed: 1.032 sec
deleteNodes(tigase.tests.pubsub.TestRestApiUsingJSON)  Time elapsed: 1.297 sec
…
createNodes(tigase.tests.pubsub.TestRestApiUsingXML)  Time elapsed: 1.087 sec
createSubnodes(tigase.tests.pubsub.TestRestApiUsingXML)  Time elapsed: 1.019 sec
configureNodes(tigase.tests.pubsub.TestRestApiUsingXML)  Time elapsed: 1.049 sec
subscribeNodes(tigase.tests.pubsub.TestRestApiUsingXML)  Time elapsed: 1.005 sec
publishItemsToNodes(tigase.tests.pubsub.TestRestApiUsingXML)  Time elapsed: 0.032 sec
retrieveItemsFromNodes(tigase.tests.pubsub.TestRestApiUsingXML)  Time elapsed: 0.012 sec
retrieveUserSubscriptions(tigase.tests.pubsub.TestRestApiUsingXML)  Time elapsed: 0.011 sec
retrieveUserSubscriptionsWithRegex(tigase.tests.pubsub.TestRestApiUsingXML)  Time elapsed: 0.006 sec
retractItemsFromNodes(tigase.tests.pubsub.TestRestApiUsingXML)  Time elapsed: 0.031 sec
unsubscribeNodes(tigase.tests.pubsub.TestRestApiUsingXML)  Time elapsed: 0.994 sec
deleteSubnodes(tigase.tests.pubsub.TestRestApiUsingXML)  Time elapsed: 1.031 sec
deleteNodes(tigase.tests.pubsub.TestRestApiUsingXML)  Time elapsed: 1.023 sec

However, could you please include debug/logs from the particular REST parts? Right now only debug from ensureNodeItemExists() (because of logger setup for JaXMPP) exists which is a bit confusing at first while looking at the test log.

Andrzej Wójcik (Tigase) commented 8 years ago

I added logging for REST API calls.

issue 1 of 1
Type
Task
Priority
Normal
Assignee
RedmineID
4728
Spent time
6h 15m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-pubsub#63
Please wait...
Page is in error, reload to recover