header
comments API--create a comment

Tag:
Edit edit   Starstar

Program Information

Name: comments API--create a comment
Domain: web service and application
Functionality: This "comments API" manages comments about music: songs, lists, artists and groups. The "create a comment" service creates a new comment, and returns a representation of the new comment as output.
Input: id: An unique identifier for the comment. (Type: String) date: Creation date of the comment. (Type: String) text: The text of the comment. (Type: String) userName: User name of the creator.
Output: id': An unique identifier for the comment. (Type: String) date': Creation date of the comment. (Type: String) text': The text of the comment. (Type: String) userName': User name of the creator.

Reference


Metamorphic Testing of RESTful Web APIs
https://dx.doi.org/10.1109/TSE.2017.2764464


MR Information

MR1------

Description:
Property:  Create a comment with a specific data. Then create another comment with the same data. Both output comments should differ only on their ids. For example, create a comment: "Hello world", then create another comment by copying the data from the former "Hello world" comment. The output comments should only differ on their ids. 
Source input: $id_{s}$,$date_{s}$,$text_{s}$,$userName_{s}$
Source output: $id_{s}'$,$date_{s}'$,$text_{s}'$,$userName_{s}'$
Follow-up input: $id_{f}$,$date_{f}$,$text_{f}$,$userName_{f}$
Follow-up output: $id_{f}'$,$date_{f}'$,$text_{f}'$,$userName_{f}'$
Input relation: $id_{s}\neq id_{f}$ $date_{s}\equiv date_{f}$ $text_{s}\equiv text_{f}$ $userName_{s}\equiv userName_{f}$     
Output relation: $id_{s}'\neq id_{f}'$ $date_{s}'\equiv date_{f}'$ $text_{s}'\equiv text_{f}'$ $userName_{s}'\equiv userName_{f}'$
Pattern: MROP:difference, MRIP:replacement, MRP:asymmetry
Insert title here