Configure environment for testing on Bamboo

Hello,

I got to test plans running on Bamboo 3.4.2, running on Linux Debian.

One is executing basic JUnit tests, the other is executing Selenium tests.

With the Selenium test plan, the Selenium server complains that it can not launch the browser.

I looked on the internet and found that I needed to set the DISPLAY environment variable. So I did it, in the .bash_profile of the bamboo user, I put

export DISPLAY=:1

But after that, I think it broke the JUnit plan, now I get this error:

java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment

Internet again, I see that i have to use the headless mode of Java, so again in the .bash_profile I put:

ANT_OPTS="-Djava.awt.headless=true"

But my plans are still broken, with the same errors. Is it the right way to configure the environment for Bamboo? We had the same plan on another server and I didn't see any particular configuration (these two environment variables are empty)

Any hint would be greatly appreciated because I'm kind of stuck now. Feel free to ask if you need more details.

Thank you!

Guillaume

1 answer

1 accepted

0 vote

Try setting the ANT_OPTS only for the JUnit plan, remove that setting from user profile.

Hello Pzemek, thank you for your answer.

I removed every environment variabels from the user profile and set some in the plan but it didn't change anything. But I saw this error that I missed before:

17-Feb-2012 17:08:00 [FATAL ERROR] com.atlassian.maven.plugin.clover.CloverReportMojo#execute() caused a linkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms:
17-Feb-2012 17:08:00 [FATAL ERROR] Plugin realm = app0.child-container[com.atlassian.maven.plugins:maven-clover2-plugin:2.6.3]

So I'm going to update the plugin, but I'm not sure if you can use the 3.x version of the plugin with Maven 2

Seems like upgrading the Clover plugin was the key, but thanks for your answer I didn't know you could have environment variables at general and plan levels

Cheers,

Guillaume

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,561 views 0 6
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you