user2636874
user2636874

Reputation: 899

source code to create jira user

I want to create a JIRA user using the api. So that I can run the test case using junit. i.e. i am trying to update the custom field of UserCFType through junit integration test. for that I have to pass some test user.

issueUpdateRequest.fields(new IssueFields().customField((long) 10200,
            testUserObject));
    try {
        issueClient.edit(testIssue, issueUpdateRequest);
    } catch (java.lang.RuntimeException e) {
        assertEquals("UnableToEditError", CLEAR_ERROR, e.getMessage());
    }

In the above code I have to pass the JIRA user in place of the testUserObject. how should I create some sample JIRA user object.

Thanks & Regards, Suresh

Upvotes: 1

Views: 206

Answers (1)

GlennV
GlennV

Reputation: 3680

You can create users using the JIRA java api with UserService.

Upvotes: 1

Related Questions