`Name:`

Spotify: Reorder a playlist's tracks `Domain:`

web service and application `Functionality:`

This service reorders a track or a group of tracks in a playlist. `Input:`

$t$: a track
`Output:`

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

`Description:`

`Property:`

Move n tracks (range_length=n) from the position 0 (range_start=0) to the last position (insert_before=n), where n is the number of tracks in the playlist. Next, repeat the same operation. The output playlist of both reorderings should be equal. `Source input:`

Move n tracks (range_length=n) from the position 0 (range_start=0) to the last position (insert_before=n), where n is the number of tracks in the playlist `Source output:`

$p$ `Follow-up input:`

Move n tracks (range_length=n) from the position 0 (range_start=0) to the last position (insert_before=n), where n is the number of tracks in the playlist
`Follow-up output:`

$p'$ `Input relation:`

Move n tracks (range_length=n) from the position 0 (range_start=0) to the last position (insert_before=n), where n is the number of tracks in the playlist. Next, repeat the same operation.
`Output relation:`

The output playlist of both reorderings should be equal.
`Pattern:`

MROP:equality, symmetry `Description:`

`Property:`

Move n/2 tracks (range_length=n/2) from the position 0 (range_start=0) to the last position (insert_before=n), where n is an even number equal to the number of tracks in the playlist. Next, repeat the same operation twice. The output playlist of the first and the last reorderings should be equal. `Source input:`

the original tracks `Source output:`

$p$ `Follow-up input:`

Move n/2 tracks (range_length=n/2) from the position 0 (range_start=0) to the last position (insert_before=n), where n is an even number equal to the number of tracks in the playlist. Next, repeat the same operation twice.
`Follow-up output:`

$p'$ `Input relation:`

Move n/2 tracks (range_length=n/2) from the position 0 (range_start=0) to the last position (insert_before=n), where n is an even number equal to the number of tracks in the playlist. Next, repeat the same operation twice.
`Output relation:`

$p$ = $p'$
`Pattern:`

MROP:equality, symmetry `Description:`

`Property:`

Move one track (range_length=1) from the position 0 (range_start=0) to the last position (insert_before=n), where n is the number of tracks in the playlist. Next, repeat the same operation n times. The output playlist of the first and the last reorderings should be equal. `Source input:`

the original tracks `Source output:`

$p$ `Follow-up input:`

Move one track (range_length=1) from the position 0 (range_start=0) to the last position (insert_before=n), where n is the number of tracks in the playlist. Next, repeat the same operation n times.
`Follow-up output:`

$p'$ `Input relation:`

Move one track (range_length=1) from the position 0 (range_start=0) to the last position (insert_before=n), where n is the number of tracks in the playlist. Next, repeat the same operation n times.
`Output relation:`

$p$ = $p'$
`Pattern:`

MROP:equality, symmetry `Description:`

`Property:`

Move the first track(range_length=1) from the position 0(range_start=0) to the las position (insert_before=n), where n is the number of tracks in the playlist. Next, move the last track (range_length=1) from the position n-1 (range_start=n-1) to position 0 (insert_before=1). Finally, repeat the initial operation moving the first track to the last position. The output playlist of the first and the last reorderings should be equal. `Source input:`

`Source output:`

$p$ `Follow-up input:`

`Follow-up output:`

$p'$ `Input relation:`

`Output relation:`

$p$ = $p'$
`Pattern:`

MROP:equality, symmetry