It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to use backdoor in integration tests with 8.x.x?

I am trying to set up integration tests with v. 8.1.11. PageObjects works fine, but Backdoor doesn't. Every backdoor operation throws a 404. Here is the test:

```
package it.hk.com.epictechnology.plugins.rest;

import com.atlassian.jira.pageobjects.JiraTestedProduct;
import com.atlassian.jira.pageobjects.pages.admin.ViewProjectsPage;
import com.atlassian.pageobjects.TestedProductFactory;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

public class RerankRequestControllerFuncTest {

public JiraTestedProduct jira = TestedProductFactory.create(JiraTestedProduct.class);

@Before
public void setup () {
jira.backdoor().subtask().enable();
}

@techoneway
public void projectCountIsValid() {
ViewProjectsPage viewProjects = jira.gotoLoginPage().loginAsSysAdmin(ViewProjectsPage.class);
assertEquals(1, viewProjects.getProjects().size());
}
}
```

This is the error:

```
<testcase name="projectCountIsValid" classname="it.hk.com.epictechnology.plugins.rest.RerankRequestControllerFuncTest" time="2.358">
<error message="Client response status: 404" type="com.sun.jersey.api.client.UniformInterfaceException">com.sun.jersey.api.client.UniformInterfaceException: Client response status: 404
at it.hk.com.epictechnology.plugins.rest.RerankRequestControllerFuncTest.setup(RerankRequestControllerFuncTest.java:24)
</error>
<system-out><![CDATA[ . Backdoor POST in 1086ms /subtask
]]></system-out>
</testcase>
```

1 answer

Which version of Jira Testkit are you using? Can you post your pom file as well!

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you