Intergration testing of plugin components


Can somebody point to examples of integration tests for BitBucket plugin components, which are not listed in atlassian-plugin.xml, but loaded by Spring Scanner?

For example, here is my component (simplified code)

public class RepositoryCreatedListener {
    private RepositoryHookService rhService;

    public void setRhService(RepositoryHookService rhService) {
        this.rhService = rhService;

    public void repositoryCreated(RepositoryCreatedEvent evt) {
        Repository repository = evt.getRepository();
        // useful things happen here


My attempt to instanciate it during itegration test

public class RepositoryCreatedListenerTest {

    private final RepositoryCreatedListener newRepositoryListener;

    public RepositoryCreatedListenerTest(RepositoryCreatedListener newRepositoryListener) {
        this.newRepositoryListener = newRepositoryListener;

    public void testMyName() {


results in
RepositoryCreatedListenerTest: Could not find resource for test [http://XXX-86LJJ5J:7990/bitbucket/rest/atlassiantestrunner/1.0/runtest/]. Status: 404 - Not Found

1 Like

Hi @viktor,

Did you manage to solve this in the end?
Im getting the same problem.

Hi @allan.leong, no, unfortunately we gave up on this ;(