Overview
Test case for degenerate use of the REST security service user management CRUD methods.
Procedure 1: Testing add services
- Add user with null argumentTest using degenerate use helper
- TEST: user parameter null -> Exception
- TEST: authToken parameter null/empty -> Exception
- Add user with incomplete user information (e.g. blank name or emailfor all fields, set to null and add)
- TEST: Should throw deserialization error
- Add user with duplicate user name Not currently implemented due to lock/timeoutu timeout issues
- TEST: Should throw DuplicateEntry exception
- Add user with already-existing hibernate id Not currently implemented due to lock/timeoutu timeout issues
- TEST: Should throw DuplicateEntry exception
Procedure 2: Testing get services
- Get user by id with null id
- TEST: Should throw null
- Get user by name with null nameTEST: Should return nullTest get by name using degenerate use helper using bad user and admin auth token
- TEST: userName parameter null -> Exception
- TEST: userName parameter empty-> Null result
- TEST: authToken parameter null/empty -> Exception
- Test get by id using degenerate use helper using bad user and admin auth token
- TEST: userName parameter null -> Exception
- TEST: userName parameter invalid-> Null result
- TEST: authToken parameter null/empty -> Exception
- Get user with invalid name (does not exist in database)
- TEST: Should return null
Procedure 3: Testing update services
- Update user with null argument
- TEST: Should throw exception
- Update user with null hibernate idTEST: Should throw exceptionTest update using degenerate use helper using bad user and admin auth token
- TEST: userName parameter null -> Exception
- TEST: authToken parameter null/empty -> Exception
- Update user with incomplete user information
- TEST: Should throw deserialization error
Procedure 4: Testing delete services
- Delete user with null id
- TEST: Should throw exception
- Delete user with invalid hibernate id (does not exist)TEST: Should throw exceptionTest update using degenerate use helper using bad user and admin auth token
- TEST: id parameter null/invalid -> Exception
- TEST: authToken parameter null/empty -> Exception
- Delete user with valid id but used by a project
- Create project
- Add user to project
- TEST: Should throw ForeignConstraint exception
- Delete user
- Delete project
Expected Runtime
- < 6s
Notes
- n/a