def test_createUser_password_below8Characters_062():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "****************  In Description :TestCase_062: Test CreateUser when user sends  -  password below 8 characters ****************"
    )
    print(
        "In Description :TestCase_062: Test CreateUser when user sends  -  password below 8 characters"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    user = username_field_validations()
    userName = user.username_regex()

    file_body = readFiles()
    body = file_body.create_user_body()
    body['password'] = "******"
    body['userName'] = userName

    com.create_user_negative(body, userName)

    com.verify_users_from_sm_with_api(userName)
def test_createuser_userName_maxPlusOne_51_006():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "****************  Test_006: Test CreateUser when user sends  -  userName with maximum Plus one(51) ****************"
    )
    print(
        "In Description : Test_006: Test CreateUser when user sends  -  userName with maximum Plus one(51) "
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    # Body
    user = username_field_validations()
    userName = user.username_max_plus_one()
    file_body = readFiles()
    body = file_body.create_user_body()
    body['userName'] = userName

    com.create_user_negative(body, userName)

    com.verify_users_from_sm_with_api(userName)
def test_createUser_sendBooleanValues_apartFrom_true_and_false_066():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "**************** In Description: TestCase_066: Test CreateUser by sending  the  boolean values apart from True or False ****************"
    )
    print(
        "In Description :TestCase_066: Test CreateUser by sending  the  boolean values apart from True or False"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    user = username_field_validations()
    userName = user.username_regex()

    file_body = readFiles()
    body = file_body.create_user_body()
    body['isADUser'] = 5
    body['userName'] = userName

    com.create_user_negative(body, userName)

    com.verify_users_from_sm_with_api(userName)
Beispiel #4
0
def test_roleName_without_EditByField_022():
    logger = LogGen.loggen()
    com = Common_role_api()
    logger.info(
        "****************  IN Description: TestCase_022: Test CreateRole by sending EditedBy='whitespaces'. ****************"
    )
    print(
        "In Description :Testcase_022: Test CreateRole by sending EditedBy='whitespaces'"
    )
    logger.info(
        "Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )
    print(
        "Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )

    roleName = random.randint(0, 9)
    print("\n Trying to create role :::", roleName)

    files = readFiles()
    body = files.create_role_body()
    body['editedBy'] = ''
    body['userRoleName'] = roleName

    com.create_role_negative(body, roleName)

    com.verify_roles_from_sm_with_api(roleName)
def test_createUser_missing_primatyID_070():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "****************  In Description :TestCase_070: Test  createUser by missing PrimaryID in the JSON body  ****************"
    )
    print(
        "In Description :TestCase_070: Test  createUser by missing PrimaryID in the JSON body"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    # Body
    user = username_field_validations()
    userName = user.username_regex()

    file_body = readFiles()
    body = file_body.create_user_body()
    body['userName'] = userName
    body['firstName'] = ''
    body['lastName'] = ''

    com.create_user_negative(body, userName)

    com.verify_users_from_sm_with_api(userName)
Beispiel #6
0
def test_roleName_without_userRoleNameField_020():
    logger = LogGen.loggen()
    com = Common_role_api()
    logger.info(
        "**************** IN Description: TestCase_020: Test CreateRole when user sends JSON without 'userRoleName'. ****************"
    )
    print(
        "In Description :Testcase_020: Test CreateRole when user sends JSON without 'userRoleName'."
    )
    logger.info(
        "Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )
    print(
        "Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )

    roleName = ""
    print("\n Trying to create role :::", roleName)

    files = readFiles()
    body = files.create_role_body()
    body['userRoleName'] = roleName

    com.create_role_negative(body, roleName)

    com.verify_roles_from_sm_with_api(roleName)
Beispiel #7
0
def test_createUser_userName_apartFrom_RegEx_024():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "****************  Test_024: Test CreateUser when user sends 'userName' values other than ^[a-zA-Z0-9\-_()'.#\\+ ]*$   "
    )
    print(
        "In Description :Test_024: Test CreateUser when user sends 'userName' values other than ^[a-zA-Z0-9\-_()'.#\\+ ]*$"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    # Body
    list = {
        ".", "!", "@", "=", "$", "%", "^", "&", "*", "~", ":", ";", "/", "/",
        "?", "]", "[", "|"
    }
    for userName in list:
        print("\n Trying to create user name ::", userName)
        file_body = readFiles()
        body = file_body.create_user_body()
        body['userName'] = userName
        com.create_user_negative(body, userName)
        com.verify_users_from_sm_with_api(userName)
Beispiel #8
0
def test_Create_defaultRole_028():
    logger = LogGen.loggen()
    com = Common_role_api()
    logger.info(
        "****************  In Description :TestCase_028: Test CreateRole for by giving default userRoleName(Administrator/Operator/Fieldservice) ****************"
    )
    print(
        "In Description :Testcase_028: Test CreateRole for by giving default userRoleName(Administrator/Operator/Fieldservice)"
    )
    logger.info(
        "Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )
    print(
        "Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )

    list = {"Administrator", "FieldService", "Operator"}
    for roleName in list:
        print("\n Trying to create roleName ::", roleName)

        files = readFiles()
        body = files.create_role_body()
        body['userRoleName'] = roleName

        com.create_role_negative(body, roleName)

        com.verify_roles_from_sm_with_api(roleName)

    logger.info("****************  Role not created ****************")
Beispiel #9
0
def test_roleName_RegEx_025():
    logger = LogGen.loggen()
    com = Common_role_api()
    logger.info(
        "****************  IN Description: TestCase_025: Test CreateRole by sending the userRoleName apart from  ^[a-zA-Z0-9\-_()'.#\\+ ]*$  (ex:- ?,@ etc.,) ****************"
    )
    print(
        "In Description :Testcase_025: Test CreateRole by sending the userRoleName apart from  ^[a-zA-Z0-9\-_()'.#\\+ ]*$  (ex:- ?,@ etc.,)"
    )
    logger.info(
        "Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )
    print(
        "Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )

    # Body
    list = {
        ".", "!", "@", "=", "$", "%", "^", "&", "*", "~", ":", ";", "/", "/",
        "?", "]", "[", "|"
    }
    for roleName in list:
        print("\n Trying to create role :::", roleName)
        files = readFiles()
        body = files.create_role_body()
        body['userRoleName'] = roleName

        com.create_role_negative(body, roleName)

        com.verify_roles_from_sm_with_api(roleName)
def test_roleName_editBy_apartfrom_RegEx_027():
    logger = LogGen.loggen()
    com = Common_role_api()
    logger.info("**************** In Description : TestCase_027: Test createRole by sending the 'EditedBy' values apart from  ^[a-zA-Z0-9]+$ ****************")
    print("In Description :Testcase_027: Test createRole by sending the 'EditedBy' values apart from  ^[a-zA-Z0-9]+$")
    logger.info("Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50")
    print("Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50")

    role = userRoleName_field_validations()
    roleName = role.userRolename_regex()

    print("\n Trying to create role :::", roleName)
    list = {".", "!", "@", "=", "$", "%", "^", "&", "*", "~", ":", ";", "/", "/", "?", "]", "[", "|"}
    for i in list:
        print("\n Trying to create role", roleName, " with editedBy:::", i)
        files = readFiles()
        body = files.create_role_body()
        body['editedBy'] = i
        body['userRoleName'] = roleName

        com.create_role_negative(body, roleName)

        com.verify_roles_from_sm_with_api(roleName)

    logger.info("****************  Role not created ****************")
Beispiel #11
0
def test_createUser_userRole_fieldService_068():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "**************** In Description : TestCase_068: Test Default fieldService and its default User Role Settings ****************"
    )
    print(
        "In Description :TestCase_068: Test Default fieldService and its default User Role Settings"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    userName = "******"

    file_body = readFiles()
    body = file_body.create_user_body()
    body['userRoleName'] = userName
    body['userName'] = userName

    com.create_user_negative(body, userName)

    com.verify_users_from_sm_with_api(userName)
Beispiel #12
0
def test_createUser_lastName_empty_034():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "****************  Test_034: Test CreateUser when user sends  - Lastname empty ****************"
    )
    print(
        "In Description :Test_034: Test CreateUser when user sends  - Lastname empty"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    # Body
    user = username_field_validations()
    userName = user.username_regex()
    file_body = readFiles()
    body = file_body.create_user_body()
    body['lastName'] = ""
    body['userName'] = userName

    com.create_user_negative(body, userName)

    com.verify_users_from_sm_with_api(userName)
Beispiel #13
0
def test_roleName_empty_013():
    logger = LogGen.loggen()
    com = Common_role_api()
    logger.info(
        "****************  IN Description: TestCase_013: Test CreateRole when user sends  - 'userRoleName' with values :: empty ****************"
    )
    print(
        "In Description :Testcase_013: Test CreateRole when user sends  - userRoleName with values :: empty"
    )
    logger.info(
        "Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )
    print(
        "Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )

    role = userRoleName_field_validations()
    roleName = role.userRolename_empty()
    files = readFiles()
    body = files.create_role_body()
    body['userRoleName'] = roleName

    com.create_role_negative(body, roleName)

    com.verify_roles_from_sm_with_api(roleName)
Beispiel #14
0
def test_createUser_email_without_atTheRate_041():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "****************  Test_041: Test CreateUser when user sends  -  Email without @ ****************"
    )
    print(
        "In Description : Test_041: Test CreateUser when user sends  -  Email without @"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    user = username_field_validations()
    userName = user.username_regex()
    file_body = readFiles()
    body = file_body.create_user_body()
    body['userName'] = userName
    body['emailAddress'] = 'aabc.com'

    com.create_user_negative(body, userName)

    com.verify_users_from_sm_with_api(userName)
Beispiel #15
0
def test_roleName_booleanFields_otherthan_true_false_023():
    logger = LogGen.loggen()
    com = Common_role_api()
    logger.info(
        "**************** In Description: TestCase_023: Test CreateRole by sending all boolean fields other than true or false. ****************"
    )
    print(
        "In Description :Testcase_023: Test CreateRole by sending all boolean fields other than true or false."
    )
    logger.info(
        "Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )
    print(
        "Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )

    roleName = random.randint(0, 9)
    print("\n Trying to create role :::", roleName)

    files = readFiles()
    body = files.create_role_body()
    body['createMethod'] = 1
    body['editMethod'] = 1
    body['deleteMethod'] = 0
    body['createActionAlertLevel'] = 1
    body['userRoleName'] = roleName

    com.create_role_negative(body, roleName)

    com.verify_roles_from_sm_with_api(roleName)
Beispiel #16
0
def test_createUser_email_apartFrom_RegEx_046():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "****************  Test_046: Test CreateUser when user sends  -  Email with apart from RegEx ****************"
    )
    print(
        "In Description :Test_046: Test CreateUser when user sends  -  Email with apart from RegEx"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    user = username_field_validations()
    userName = user.username_regex()

    list = {
        ".", "!", "@", "=", "$", "%", "^", "&", "*", "~", ":", ";", "/", "/",
        "?", "]", "[", "|"
    }
    for i in list:
        j = i + "@abc.com"
        file_body = readFiles()
        body = file_body.create_user_body()
        body['emailAddress'] = j
        body['userName'] = userName

        com.create_user_negative(body, userName)

        com.verify_users_from_sm_with_api(userName)
def test_roleName_maxPlusOne_004():
    logger = LogGen.loggen()
    com = Common_role_api()
    logger.info(
        "**************** IN Description: TestCase_004 : Test CreateRole when user sends  - userRoleName with Maximum+1 value("
        "51) ****************")
    print(
        "**************** IN Description: TestCase_004 : Test CreateRole when user sends  - userRoleName with Maximum+1 value("
        "51) ****************")
    logger.info(
        "Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )
    print(
        "jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )

    role = userRoleName_field_validations()
    roleName = role.userRolename_max_plus_one()
    file_body = readFiles()
    body = file_body.create_role_body()
    body['userRoleName'] = roleName

    com.create_role_negative(body, roleName)

    com.verify_roles_from_sm_with_api(roleName)
def test_createUser_invalid_password_combination_065():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "**************** In Description: TestCase_065: Test CreateUser when user sends  -  invalid password combination ****************"
    )
    print(
        "In Description :TestCase_065: Test CreateUser when user sends  -  invalid password combination "
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    user = username_field_validations()
    userName = user.username_regex()

    file_body = readFiles()
    body = file_body.create_user_body()
    body['password'] = "******"
    body['confirmPassword'] = '******'
    body['userName'] = userName

    com.create_user_negative(body, userName)

    com.verify_users_from_sm_with_api(userName)
Beispiel #19
0
def test_createuser_userName_numbers_018():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info("****************  Test_018: Test CreateUser when user sends  -  userName with numbers ****************")
    print("In Description :Test_018: Test CreateUser when user sends  -  userName with numbers ")
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50")
    print("Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50")

    # Body
    user = username_field_validations()
    userName = user.username_numbers()
    file_body = readFiles()
    body = file_body.create_user_body()
    body['userName'] = userName

    com.create_user_positive(body, userName)

    com.verify_users_from_sm_with_api(userName)

    e = com.verify_user_options(userName)
    assert e['firstName'] == 'v'
    assert e['middleInitial'] == 'i'
    assert e['lastName'] == 'j'
    assert e['emailAddress'] == '*****@*****.**'
    assert e['telephoneNumber'] == '23'
    assert e['extension'] == '5309'
    assert e['password'] == 'Password123'
    assert e['userRoleName'] == 'Operator'
    assert e['deactivated'] == False
    assert e['hidden'] == False
    assert e['isADUser'] == False
    print("All the options are matched with the request")
def test_createUser_email_maxPlusOne_255Characters_052():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "**************** In Description: TestCase_052: Test CreateUser when user sends  -  email  maxPlusOne 255 characters ****************"
    )
    print(
        "In Description :In Description: TestCase_052: Test CreateUser when user sends  -  email  maxPlusOne 255 characters"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    user = username_field_validations()
    userName = user.username_regex()

    file_body = readFiles()
    body = file_body.create_user_body()
    body[
        'emailAddress'] = "*****@*****.**"
    body['userName'] = userName

    com.create_user_negative(body, userName)

    com.verify_users_from_sm_with_api(userName)
def test_createUser_password_confirmPassword_different_059():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "**************** In Description: TestCase_059: Test CreateUser when user sends  -  password and ConfirmPassword doesn't match ****************"
    )
    print(
        "In Description :TestCase_059: Test CreateUser when user sends  -  password and ConfirmPassword doesn't match"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    user = username_field_validations()
    userName = user.username_regex()

    file_body = readFiles()
    body = file_body.create_user_body()
    body['password'] = "******"
    body['confirmPassword'] = '******'
    body['userName'] = userName

    com.create_user_negative(body, userName)

    com.verify_users_from_sm_with_api(userName)
def test_createUser_userName_miss_primaryID_022():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "****************  Test_022: Test CreateUser when user sends  - Miss any of the Primary ID's and send the Request(FirstName, LastName, Email ID, Telephone, password, confirmPassword) ****************"
    )
    print(
        "In Description :Test_022: Test CreateUser when user sends  - Miss any of the Primary ID's and send the Request(FirstName, LastName, Email ID, Telephone, password, confirmPassword)"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    user = username_field_validations()
    userName = user.username_empty()
    file_body = readFiles()
    body = file_body.create_user_body()
    body['userName'] = userName

    com.create_user_negative(body, userName)

    com.verify_users_from_sm_with_api(userName)
def test_createuser_existingUser_003():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "****************  Test_003: Test CreateUser when user sends  -  existing username ****************"
    )
    print(
        "In Description : Test_003: Test CreateUser when user sends  -  existing username"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    # Body
    list = com.getUsersList()
    userName = random.choice(list)
    print("\n Trying to create user :::", userName)

    file_body = readFiles()
    body = file_body.create_user_body()
    body['userName'] = userName

    com.create_user_negative(body, userName)

    com.verify_users_from_sm_with_api(userName)
Beispiel #24
0
def test_createUser_userName_with_whiteSpaces_025():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "****************  Test_025:Test CreateUser when user sends userName values as white spaces "
    )
    print(
        "In Description :Test_025:Test CreateUser when user sends userName values as white spaces"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    # Body
    user = username_field_validations()
    userName = user.username_whitespace()
    file_body = readFiles()
    body = file_body.create_user_body()
    body['userName'] = userName

    com.create_user_negative(body, userName)
    com.verify_users_from_sm_with_api(userName)
Beispiel #25
0
def test_createUser_telephone_endWithSpace_056():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "****************  In Description :TestCase_056: Test CreateUser when user sends  -  telephone end with space ****************"
    )
    print(
        "In Description : In Description :TestCase_056: Test CreateUser when user sends  -  telephone end with space"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    user = username_field_validations()
    userName = user.username_regex()

    telephone = telephonenumber_field_validations()
    telephoneNumber = telephone.telephone_end_with_space()

    file_body = readFiles()
    body = file_body.create_user_body()
    body['telephoneNumber'] = telephoneNumber
    body['userName'] = userName

    com.create_user_negative(body, userName)

    com.verify_users_from_sm_with_api(userName)
Beispiel #26
0
def test_createUser_email_with_64Characters_before_atTheRate_047():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "****************  Test_047: Test CreateUser when user sends  -  Email with 64 characters before @ ****************"
    )
    print(
        "In Description :Test_047: Test CreateUser when user sends  -  Email with 64 characters before @"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    user = username_field_validations()
    userName = user.username_regex()

    emailAddress = '*****@*****.**'

    file_body = readFiles()
    body = file_body.create_user_body()
    body['emailAddress'] = emailAddress
    body['userName'] = userName

    com.create_user_positive(body, userName)

    com.verify_users_from_sm_with_api(userName)

    e = com.verify_user_options(userName)
    assert e['userName'] == userName
    assert e['firstName'] == 'v'
    assert e['middleInitial'] == 'i'
    assert e['lastName'] == 'j'
    assert e['emailAddress'] == emailAddress
    assert e['telephoneNumber'] == '23'
    assert e['extension'] == '5309'
    assert e['password'] == 'Password123'
    assert e['userRoleName'] == 'Operator'
    assert e['deactivated'] == False
    assert e['hidden'] == False
    assert e['isADUser'] == True
    print("All the options are matched with the request")
Beispiel #27
0
def test_createUser_phoneNumber_empty_053():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info("**************** IN description : TestCase_053: Test CreateUser when user sends  -  telephone value as empty ****************")
    print("IN description : TestCase_053: Test CreateUser when user sends  -  telephone value as empty")
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50")
    print("Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50")

    user = username_field_validations()
    userName = user.username_regex()

    file_body = readFiles()
    body = file_body.create_user_body()
    body['telephoneNumber'] = ''
    body['userName'] = userName

    com.create_user_positive(body, userName)

    com.verify_users_from_sm_with_api(userName)
Beispiel #28
0
def test_createUser_userName_editedBy_null_026():
    logger = LogGen.loggen()
    com = common_createUser_api()
    file_body = readFiles()
    logger.info("****************  Test_026: Test CreateUser when user sends EditedBy values as empty")
    print("In Description : Test_026: Test CreateUser when user sends EditedBy values as empty")
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50")
    print("Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50")

    # Body
    user = username_field_validations()
    userName = user.username_regex()

    body = file_body.create_user_body()
    print("Sending EditedBy value as NULL")
    body['editedBy'] = ''
    body['userName'] = userName

    com.create_user_negative(body, userName)
    com.verify_users_from_sm_with_api(userName)
def test_createUser_lastName_apartFrom_RegEx_037():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "****************  Test_037: Test CreateUser when user sends  -  lastname apart from RegEx ****************"
    )
    print(
        "In Description :Test_037: Test CreateUser when user sends  -  lastname apart from RegEx"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    # URL
    url = ReadConfig.sm()

    # Additional headers.
    headers = com.headers()

    # Body
    x = Xeger(limit=15)
    name = com.userName_RegEx()
    userName = x.xeger(name)
    list = {
        ".", "!", "@", "=", "$", "%", "^", "&", "*", "~", ":", ";", "/", "/",
        "?", "]", "[", "|"
    }
    for i in list:
        print(
            "Creating user by sending lastname value apart from RegEx - Sending value ::",
            i)
        file_body = readFiles()
        body = file_body.create_user_body()
        body['lastName'] = i
        body['userName'] = userName
        com.create_user_negative(body, userName)

        com.verify_users_from_sm_with_api(userName)
Beispiel #30
0
def test_changeParameter_true_to_false_002():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info("****************  Test_002: Test CreateUser when user sends  - Change the parameter values inside body.(True to false and false to true) ****************")
    print("In Description : Test_002: Test CreateUser when user sends  - Change the parameter values inside body.(True to false and false to true) ")
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50")
    print("Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50")

    # Body
    user = username_field_validations()
    userName = user.username_regex()

    list = ['true', 'false']
    a=random.choice(list)
    print("\n Sending isADUser as ::", a)
    print("\n Trying creating username   ::", userName)

    file_body = readFiles()
    body = file_body.create_user_body()
    body['userName'] = userName
    body['isADuser'] = a

    com.create_user_positive(body, userName)
    com.verify_users_from_sm_with_api(userName)

    e = com.verify_user_options(userName)
    assert e['userName'] == userName
    assert e['firstName'] == 'v'
    assert e['middleInitial'] == 'i'
    assert e['lastName'] == 'j'
    assert e['emailAddress'] == '*****@*****.**'
    assert e['telephoneNumber'] == '23'
    assert e['extension'] == '5309'
    assert e['password'] == 'Password123'
    assert e['userRoleName'] == 'Administrator'
    assert e['deactivated'] == False
    assert e['hidden'] == False
    print("All the options are matched with the request")