Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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 write integration test for custom Bitbucket plugin developed via Atlassian Java SDK



I developed a Bitbucket plugin (PostRepositoryHook) using the Atlassian Java SDK. This plugin makes some file changes in the master branch every time after a feature branch merges into the master branch. Right now I am trying to figure out how to write integration tests for this plugin. I have read about the tutorials about how to set up the integration test skeleton ( However I wonder how I can invoke my plugin in the integration test.


The constructor of my PostRepositoryHook plugin has parameters: ContentService and PullRequestService. And the postUpdate method of my PostRepositoryHook plugin has parameters: PostRepositoryHookContext and RepositoryHookRequest. I am not sure where I can fetch these inputs and pass to my PostRepository plugin. 


Also, I am not sure how I can simulate the branch merge action in this integration test environment?


Any help is greatly appreciated!





1 answer

1 accepted

0 votes
Answer accepted
Charlie Misonne Community Leader May 17, 2021

Hi Jiawei,

I can't help you but I think you might have more luck on te developer community.

Thanks Charlie! I will post the question there.

Like Charlie Misonne likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

236 views 2 5
Read article

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