Hello,
Problem statement : use rest-assured to login intto JIRA Cloud using valid credentials, fetch authentication token, use that token to create a new test case in jira, fetch the test case DI from the response.
tools: rest-assured api, java, maven.
test case:
@Test
public void LoginandFetchToken() throws Exception {
authentication = preemptive().basic("username", "password");
try {
} finally {
RestAssured.reset();
}
Response resp = given().contentType("application/x-www-form-urlencoded").
System.out.println(resp.asString());
}
Expected output: HTML Response to fetch atl_Token.
Actual output:
<p class="indra-signup">
<a href="/login/forgot" id="forgot" name="forgot">Unable to access your account?</a><br />
<span id="signup-disabled">To request an account, please contact your site administrators.</span>
<span id="signup-enabled">
<a href="/admin/users/sign-up">Create an account</a>
</span>
</p>
any help is much appreciated.
Regards
Deepanshu