functional test cases#120
Conversation
| "errmsg": "Role of the user is required" | ||
| "err": "INVALID_USER_DATA", | ||
| "status": "INVALID_USER_DATA", | ||
| "errmsg": "Given User Data doesn't exist in our records. Please provide a valid one" |
There was a problem hiding this comment.
@kirtisagarksj this test is for empty role , so it should throw role error.
| public void testDeleteUserNoteFailureWithInvalidNoteId() { | ||
| getTestCase().setName(TEST_DELETE_USER_NOTE_FAILURE_WITH_INVALID_NOTEID); | ||
| beforeTest(); | ||
| //beforeTest(); |
There was a problem hiding this comment.
why beforeTest(); is commented.
|
beforeTest() is commented because the test is for Invalid NoteId. So we
don`t need to call beforeTest to get note id
…On Fri, Oct 19, 2018 at 5:05 PM manzarul Haque ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
sunbird_service_api_test/src/test/java/org/sunbird/integration/test/user/notes/DeleteUserNoteTest.java
<#120 (comment)>
:
> @@ -80,7 +80,7 @@ public void testDeleteUserNoteSuccess(
@citrustest
public void testDeleteUserNoteFailureWithInvalidNoteId() {
getTestCase().setName(TEST_DELETE_USER_NOTE_FAILURE_WITH_INVALID_NOTEID);
- beforeTest();
+ //beforeTest();
why beforeTest(); is commented.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#120 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AomXLrsqPaNaEVInPOPGVaUjdyh-vlr0ks5umbj9gaJpZM4XuT4W>
.
|
| @Test(dataProvider = "addUserToOrgFailureDataProvider") | ||
| @CitrusParameters({"testName"}) | ||
| @Test(dataProvider = "addUserToOrgDataProvider") | ||
| @CitrusParameters({"testName", "getUserId", "httpStatus"}) |
There was a problem hiding this comment.
getUserId is used for which purpose
| @@ -1,5 +1,6 @@ | |||
| { | |||
| "request": { | |||
| "organisationId": "${organisationId}", | |||
There was a problem hiding this comment.
Why we always send "organisationId": "${organisationId}" is added in request.
| @@ -5,10 +5,10 @@ | |||
| "params": { | |||
There was a problem hiding this comment.
Why user not found will be internal error.
|
|
||
| public class AddUserToOrgTest extends BaseCitrusTestRunner { | ||
|
|
||
| public static final String TEST_ADD_USER_TO_ORG_FAILURE_WITH_EMPTY_ROLE_ARRAY = |
There was a problem hiding this comment.
Constant name and value don't correspond.
| @CitrusParameters({"testName", "getUserId", "httpStatus"}) | ||
| @CitrusTest | ||
| public void testAddUserToOrgFailure(String testName) { | ||
| public void testAddUserToOrgFailure(String testName, boolean getUserId, HttpStatus httpStatus) { |
There was a problem hiding this comment.
Test name and data provider name mismatch.
| return new Object[][] { | ||
| new Object[] {TEST_BLOCK_USER_FAILURE_WITHOUT_ACCESS_TOKEN, false, HttpStatus.UNAUTHORIZED}, | ||
| new Object[] {TEST_BLOCK_USER_FAILURE_WITH_INVALID_USERID, true, HttpStatus.NOT_FOUND}, | ||
| new Object[] {TEST_BLOCK_USER_FAILURE_WITH_INVALID_USERID, true, HttpStatus.INTERNAL_SERVER_ERROR}, |
There was a problem hiding this comment.
Why does invalid user ID result in internal server error?
|
|
||
| private void blockUser() { | ||
| UserUtil.blockUser(this, TEMPLATE_DIR_BLOCK, TEST_BA_BLOCK_USER_SUCCESS_WITH_VALID_USERID); | ||
| UserUtil.blockUser(this, TEMPLATE_DIR, "testGetUserByUserIdFailureWithBlockedUser"); |
There was a problem hiding this comment.
Why failure request templates passed to block user method?
| return new Object[][] { | ||
| new Object[] {TEST_UNBLOCK_USER_FAILURE_WITHOUT_ACCESS_TOKEN, false, HttpStatus.UNAUTHORIZED}, | ||
| new Object[] {TEST_UNBLOCK_USER_FAILURE_WITH_INVALID_USERID, true, HttpStatus.NOT_FOUND}, | ||
| new Object[] {TEST_UNBLOCK_USER_FAILURE_WITH_INVALID_USERID, true, HttpStatus.INTERNAL_SERVER_ERROR}, |
There was a problem hiding this comment.
Why does invalid user ID result in internal server error?
|
|
||
| return new Object[][] { | ||
| new Object[] {TEST_UNBLOCK_USER_SUCCESS_WITH_VALID_USERID, true, HttpStatus.OK}, | ||
| new Object[] {TEST_UNBLOCK_USER_SUCCESS_WITH_VALID_USERID, true, HttpStatus.INTERNAL_SERVER_ERROR}, |
There was a problem hiding this comment.
Why does success test result in internal server error?
| new Object[] {TEST_UPDATE_USER_LOGIN_TIME_SUCCESS_WITH_INVALID_USER_ID, true, HttpStatus.OK}, | ||
| }; | ||
| } | ||
| return new Object[][]{ |
There was a problem hiding this comment.
Format code properly.
| }, | ||
| new Object[] { | ||
| TEST_UPDATE_USER_PROFILE_VISIBILITY_FAILURE_WITH_INVALID_USERID, true, HttpStatus.NOT_FOUND | ||
| TEST_UPDATE_USER_PROFILE_VISIBILITY_FAILURE_WITH_INVALID_USERID, true, HttpStatus.BAD_REQUEST, false |
There was a problem hiding this comment.
Why does invalid user ID result in bad request? Not found is more relevant.
| "err":"MANDATORY_PARAMETER_MISSING", | ||
| "status":"MANDATORY_PARAMETER_MISSING", | ||
| "errmsg":"Mandatory parameter filters is missing." | ||
| ======= |
There was a problem hiding this comment.
Unresolved merge conflict is being pushed !
No description provided.