header
Spotify: Search for an item

Tag:
Edit edit   Starstar   Delete   Add Picture

Program Information

Name: Spotify: Search for an item
Domain: web service and application
Functionality: This service gets Spotify catalog information about artists, albums, tracks or playlists that match a keyword string. More details in https://developer.spotify.com/web-api/search-item/
Input: $Search$: a search criterion
Output: $Result$: the search result returned by the criterion

Reference

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


MR Information

MR1------

Description:
Property: Perform a search setting the maximum number of results per page to n (limit=n). Then, repeat the same search setting the maximum number of results per page to m (limit=m), with n<>m. The result set of both searches should be equal.
Source input: a search setting with the maximum number of results per page to n
Source output: $Result$
Follow-up input: the same search setting with the maximum number of results per page to m
Follow-up output: $Result'$
Input relation: the same search setting except the maximum number of results per page is different     
Output relation: $Result$=$Result'$
Pattern: MROP:equality, symmetry

MR2------

Description:
Property: Perform a search for albums. Then repeat the search filtering by market. The result set of the second search should be a subset of the one returned in the first search.
Source input: a search for albums
Source output: $Result$
Follow-up input: repeat the search filtering by market
Follow-up output: $Result'$
Input relation: the second search is filtered by market
Output relation: $Result \subseteq Result'$
Pattern: MROP:subset, asymmetry

MR3------

Description:
Property: Perform a search for albums with the query "q". Then repeat the search appending a new keyword k to the query ("q k"). The result set of the second search should be a subset of the one returned in the first search.
Source input: Perform a search for albums with the query "q"
Source output: $Result$
Follow-up input: repeat the search appending a new keyword k to the query ("q k")
Follow-up output: $Result'$
Input relation: the second search append a keyword k to the first search
Output relation: $Result \subseteq Result'$
Pattern: MROP:subset, asymmetry

MR4------

Description:
Property: Perform a search for albums with the query "q". Then repeat the search excluding those items that also contain a keyword k ("q NOT k"). The result set of the second search should be a subset of the one returned in the first search.
Source input: Perform a search for albums with the query "q"
Source output: $Result$
Follow-up input: repeat the search excluding those items that also contain a keyword k ("q NOT k").
Follow-up output: $Result'$
Input relation: the second search excluding items that also contain a keyword k ("q NOT k").
Output relation: $Result \subseteq Result'$
Pattern: MROP:subset, asymmetry

MR5------

Description:
Property: Perform a search for albums with the query "q" obtaining a result set R1. Then repeat the search appending a new keyword k to the query ("q k") obtaining a result set R2. Finally, perform another search for items including q and excluding those that also contain k ("q NOT k") obtaining a result set R3. The results of R2 and R3 should be a subset of the results returned in R1. Also, the following relation should hold: |R3| = |R1| - |R2|.
Source input: Perform a search for albums with the query "q"
Source output: a result set $R1$
Follow-up input: repeat the search appending a new keyword k to the query ("q k") obtaining a result set R2. Perform another search for items including q and excluding those that also contain k ("q NOT k") obtaining a result set R3
Follow-up output: result sets $R2$, $R3$
Input relation: the second search excluding items that also contain a keyword k ("q NOT k").
Output relation: $R2 \subseteq R1$, $R3 \subseteq R1$, $|R3| = |R1| - |R2|$
Pattern: MROP:subset, equality, symmetry

MR6------

Description:
Property: Perform a search for albums including the keywords k or t ("k OR t"). Then perform another search for albums including the keywords k and t ("k t"). The result set of the second search should be a subset of the one returned in the first search.
Source input: Perform a search for albums including the keywords k or t ("k OR t")
Source output: $Result$
Follow-up input: perform another search for albums including the keywords k and t ("k t")
Follow-up output: $Result'$
Input relation: the first search includes the keywords k or t, while the second search includes the keywords k and t
Output relation: $Result \subseteq Result'$
Pattern: MROP:subset, asymmetry

MR7------

Description:
Property: Perform a search for albums. Then repeat the search including the field filter tag:hipster to retrieve only albums with the lowest 10\% popularity. The result set of the second search should be a subset of the one returned in the original search.
Source input: Perform a search for albums
Source output: $Result$
Follow-up input: repeat the search including the field filter tag:hipster to retrieve only albums with the lowest 10\% popularity
Follow-up output: $Result'$
Input relation: the first search includes the keywords k or t, while the second search includes the keywords k and t
Output relation: $Result \subseteq Result'$
Pattern: MROP:subset, asymmetry

MR8------

Description:
Property: Perform a search for albums. Then repeat the search including the field filter tag:new to retrieve only albums released in the last two weeks. The result set of the second search should be a subset of the one returned in the original search.
Source input: Perform a search for albums
Source output: $Result$
Follow-up input: repeat the search including the field filter tag:hipster to retrieve only albums with the lowest 10\% popularity
Follow-up output: $Result'$
Input relation: the first search includes the keywords k or t, while the second search includes the keywords k and t
Output relation: $Result \subseteq Result'$
Pattern: MROP:subset, asymmetry

MR9------

Description:
Property: Perform a search for albums including the query q in the album name ("album:q"). Then repeat the search filtering by artist ("album:q artist:a"). The result set of the second search should be a subset of the one returned in the first search.
Source input: Perform a search for albums including the query q in the album name ("album:q").
Source output: $Result$
Follow-up input: repeat the search including the field filter tag:hipster to retrieve only albums with the lowest 10\% popularity
Follow-up output: $Result'$
Input relation: the first search includes the keywords k or t, while the second search includes the keywords k and t
Output relation: $Result \subseteq Result'$
Pattern: MROP:subset, asymmetry

MR10------

Description:
Property: Perform a search for albums with the query "q" restricting the search to the album name in all cases obtaining a result set R1. Then repeat the search appending a new keyword k to the query ("q k") obtaining a result set R2. Finally, perform another search for items including q and excluding those that also contain k ("q NOT k") obtaining a result set R3. The results of R2 and R3 should be a subset of the results returned in R1. Also, the following relation should hold: |R3| = |R1| - |R2|.
Source input: Perform a search for albums with the query "q"
Source output: a result set $R1$
Follow-up input: repeat the search appending a new keyword k to the query ("q k") obtaining a result set R2. Perform another search for items including q and excluding those that also contain k ("q NOT k") obtaining a result set R3
Follow-up output: $R2$, $R3$
Input relation: the second search excluding items that also contain a keyword k ("q NOT k").
Output relation: $R2 \subseteq R1$, $R3 \subseteq R1$, $|R3| = |R1| - |R2|$
Pattern: MROP:subset, equality, symmetry

MR11------

Description:
Property: Perform a search for albums. Then repeat the search including a year filter ("q year:y"). The result set of the first search should contain all the items found in the second search.
Source input: Perform a search for albums
Source output: $Result$
Follow-up input: repeat the search appending a new keyword k to the query ("q k") obtaining a result set R2. Perform another search for items including q and excluding those that also contain k ("q NOT k") obtaining a result set R3
Follow-up output: $R2$, $R3$
Input relation: repeat the search including a year filter ("q year:y")
Output relation: $Result' \subseteq Result$
Pattern: MROP:subset, asymmetry

MR12------

Description:
Property: Perform a search for albums including the keyword k and excluding the keyword t ("k NOT t"). Then repeat the search including the keywords k and t ("k t"). The result set of both searches should have no items in common.
Source input: Perform a search for albums including the keyword k and excluding the keyword t ("k NOT t").
Source output: $Result$
Follow-up input: repeat the search appending a new keyword k to the query ("q k") obtaining a result set R2. Perform another search for items including q and excluding those that also contain k ("q NOT k") obtaining a result set R3
Follow-up output: $R2$, $R3$
Input relation: repeat the search including a year filter ("q year:y")
Output relation: $Result'$ and $Result$ should have no items in common
Pattern: MROP:disjoint, asymmetry

MR13------

Description:
Property: Perform a search for albums published before a year y. Then perform another search for albums published after y with the same query as before. The result set of both searches should be disjoint.
Source input: Perform a search for albums published before a year y
Source output: $Result$
Follow-up input: repeat the search appending a new keyword k to the query ("q k") obtaining a result set R2. Perform another search for items including q and excluding those that also contain k ("q NOT k") obtaining a result set R3
Follow-up output: $R2$, $R3$
Input relation: the search of first query request the output of the ablums before year y, and the second request the output after year y
Output relation: $Result'$ and $Result$ should have no items in common
Pattern: MROP:disjoint, asymmetry

MR14------

Description:
Property: Perform a search for albums published between the year y and the year z (year:y-z). Then, perform a search with the same query for albums published between y and z1, with y<z1<z-1. Finally, perform another search for albums published between y2 and z, with y2=z1+1. The union of the result sets of the second and the third search should contain the same items as the result set returned by the first search.
Source input: Perform a search for albums published between the year y and the year z (year:y-z).
Source output: $R1$
Follow-up input: repeat the search appending a new keyword k to the query ("q k") obtaining a result set R2. Perform another search for items including q and excluding those that also contain k ("q NOT k") obtaining a result set R3
Follow-up output: $R2$, $R3$
Input relation:
Output relation: $R1$ = $R2$ + $R3$
Pattern: MROP:complete, symmetry
Insert title here