Skip to content

Testcase Overview

uniray7 edited this page Sep 7, 2016 · 3 revisions

REST API endpoint /media (media.spec.js)

  • Media - CRUD:
    • create a new media for panophoto with location name
    • create a new media for panophoto with location id
    • create a new media for panophoto without location data
    • create a new media for livephoto
    • return 400 if missing properties when creating a livephoto media
    • return 400 if missing properties when creating a livephoto media(2)
    • return 400 if create a livephoto media with invalid properties missing properties
    • return 400 if create a livephoto media with invalid properties (2)
    • return a media by id
    • return a media by id (2)
    • return a media by id (with access token)
    • return a media by id (with access token) (2)
    • update media caption
    • delete a media
    • return 401 when delete a media by using a token that does not have the authority
  • Media - like
    • like a media
    • return 400 if request body does not contain userId when like a media
    • return 404 when like a media that does not exist
    • unlike a media
    • return 400 if request body does not contain userId when unlike a media
    • return 404 when unlike a media that does not exist

Media - integration (media.integration.spec.js)

  • Media - like:
    • like a media and the count should increase 1
    • like a media by different users
    • retrun the liked user list of a given media
    • ignore duplicated likes
    • unlike a media and the count should decrease 1
    • unlike a media by different users
    • ignore double unlike

REST API endpoint /users (user.spec.js)

  • User creating
    • create a new user
    • reject user creation of duplicated username
    • reject user creation of duplicated email
  • User login/out
    • login a user by providing valid credentials
    • logout a user by providing access token
  • User accessing
    • return a user by providing valid user id and valid access token
    • return a user by providing id param as a literal and a valid access token
    • not return a user by providing mismatching userId and token
    • return a list of media
    • upload user profile photo (skip)
    • change user profile photo (skip)
  • User following
    • follow a user
    • ignore duplicated following
    • unfollow a user
    • ignore double unfollowing
    • return 404 if the followee does not exist
    • get follower list of a given user
    • get following list of a given user
    • get following list of a given user (2)
  • User editing
    • update a user
    • delete a user
  • User changing password
    • change password
    • without providing old password
    • without providing new password
    • change password with incorrect old password
  • User feedback
    • send feedback

Users - integration (user.integration.spec.js)

  • User querying:
    • media from following users (with default limit)
    • media from following users (with default limit) (2)
    • media from following users (with custom limit)
    • media from following users (with custom limit) (2)
    • two pages (with custom limit)
    • 400 for invalid where query (unsupported query operator)
    • 400 for invalid where query (invalid query operator type)
    • 400 for invalid where query (unsupport query target)
  • following:
    • follower list of a given user and check the relation with each user in the list
    • following list of a given user and check the relation with each user in the list
  • profile and media:
    • user own profile
    • user own profile (FB registered user)
    • the profile from other user
    • 401 if get profile without authorization
    • 401 if get profile without authorization (2)
    • user own media
    • 401 if query user media without authorization
    • 401 if query user media without authorization (2)
    • media from other user

REST API endpoint /media (media.spec.js)

  • Media - CRUD:
    • create a new media for panophoto with location name
    • create a new media for panophoto with location id
    • create a new media for panophoto without location data
    • create a new media for livephoto
    • return 400 if missing properties when creating a livephoto media
    • return 400 if missing properties when creating a livephoto media(2)
    • return 400 if create a livephoto media with invalid properties missing properties
    • return 400 if create a livephoto media with invalid properties (2)
    • return a media by id
    • return a media by id (2)
    • return a media by id (with access token)
    • return a media by id (with access token) (2)
    • update media caption
    • delete a media
    • return 401 when delete a media by using a token that does not have the authority
  • Media - like
    • like a media
    • return 400 if request body does not contain userId when like a media
    • return 404 when like a media that does not exist
    • unlike a media
    • return 400 if request body does not contain userId when unlike a media
    • return 404 when unlike a media that does not exist

Media - integration (media.integration.spec.js)

  • Media - like:
    • like a media and the count should increase 1
    • like a media by different users
    • retrun the liked user list of a given media
    • ignore duplicated likes
    • unlike a media and the count should decrease 1
    • unlike a media by different users
    • ignore double unlike

REST API endpoint /users (user.spec.js)

  • User creating
    • create a new user
    • reject user creation of duplicated username
    • reject user creation of duplicated email
  • User login/out
    • login a user by providing valid credentials
    • logout a user by providing access token
  • User accessing
    • return a user by providing valid user id and valid access token
    • return a user by providing id param as a literal and a valid access token
    • not return a user by providing mismatching userId and token
    • return a list of media
    • upload user profile photo (skip)
    • change user profile photo (skip)
  • User following
    • follow a user
    • ignore duplicated following
    • unfollow a user
    • ignore double unfollowing
    • return 404 if the followee does not exist
    • get follower list of a given user
    • get following list of a given user
    • get following list of a given user (2)
  • User editing
    • update a user
    • delete a user
  • User changing password
    • change password
    • without providing old password
    • without providing new password
    • change password with incorrect old password
  • User feedback
    • send feedback

Users - integration (user.integration.spec.js)

  • User querying:
    • media from following users (with default limit)
    • media from following users (with default limit) (2)
    • media from following users (with custom limit)
    • media from following users (with custom limit) (2)
    • two pages (with custom limit)
    • 400 for invalid where query (unsupported query operator)
    • 400 for invalid where query (invalid query operator type)
    • 400 for invalid where query (unsupport query target)
  • following:
    • follower list of a given user and check the relation with each user in the list
    • following list of a given user and check the relation with each user in the list
  • profile and media:
    • user own profile
    • user own profile (FB registered user)
    • the profile from other user
    • 401 if get profile without authorization
    • 401 if get profile without authorization (2)
    • user own media
    • 401 if query user media without authorization
    • 401 if query user media without authorization (2)
    • media from other user
Clone this wiki locally