Bug 869500 - RFE: "Hello world" objects for REST client integration testing
Summary: RFE: "Hello world" objects for REST client integration testing
Keywords:
Status: NEW
Alias: None
Product: PressGang CCMS
Classification: Community
Component: REST-API
Version: 1.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-24 05:49 UTC by Joshua Wulf
Modified: 2023-02-21 23:19 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Joshua Wulf 2012-10-24 05:49:34 UTC
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 12:20:56 UTC
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.