Bug 869500 - RFE: "Hello world" objects for REST client integration testing
RFE: "Hello world" objects for REST client integration testing
Status: NEW
Product: PressGang CCMS
Classification: Community
Component: REST-API (Show other bugs)
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: pressgang-ccms-dev
Depends On:
  Show dependency treegraph
Reported: 2012-10-24 01:49 EDT by Joshua Wulf
Modified: 2014-10-26 21:13 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joshua Wulf 2012-10-24 01:49:34 EDT
For unit testing applications (and especially libraries) that talk to the PressGang REST API, a set of "Hello world" objects would be extremely useful.

These objects would be guaranteed to be present on every instance of PressGang from the point of new installation. This enables automated testing against any 
PressGang instance.

The Hello world objects would be things like:

A topic with a specific ID, and a specific number of revisions with fixed numbers.

A sample content spec with a specific ID, and the topics to support it.

Unit tests for any REST client can then be written to retrieve these objects. Since the ids and contents of the objects are known, the expected values of the unit tests are easy to write and check.

The alternative is a more limited testing, the necessity to configure a specific PressGang instance, or encoding installation-specific information in unit tests. All of these are less than ideal.
Comment 1 Joshua Wulf 2012-10-24 08:20:56 EDT
You can see the unit tests I've written here: https://github.com/jwulf/node-pressgang-rest/blob/master/tests/pressgangccms-wet.spec.js

I have to hard code IDs and Revisions, and I can't test the actual returned strings and objects without: (a) exposing configured data, and (b) making the tests non-portable.

Note You need to log in before you can comment on or make changes to this bug.