Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Bamboo cannot find my tests

The hierarchy of my project test files is: app/test/services/<some sub_dir>/blahblah.test.js

And I get the following error: 

Error: Cannot find module '/mnt/data/bamboo-home/xml-data/build-dir/ESR-WRITETEST1-JOB1/app/test/services'

Nevertheless, when I SSH into the Bamboo app on the hosting service, I can see that the files do exist in the build dirs. And furthermore, why does it say cannot find MODULE

The task in which this fails is a Mocha Test Runner task. The configuration is the following:

Screen Shot 2016-12-19 at 17.11.25.png

 

When I execute the tests locally, I run the following command: 

"NODE_ENV=test mocha --recursive test/* test/**/*"

2 answers

0 votes
rsperafico Atlassian Team Dec 19, 2016

Hello Galin,

Please, raise a support request (https://support.atlassian.com) so we can better assist you.

If possible, please mention this inquire (https://answers.atlassian.com/questions/45403027) in the ticket's description so we can keep track of your original request.

Kind regards,
Rafael P. Sperafico

Hey Galin,

I believe I had a similar issue with getting some tests to run with Node + Mocha.

Are the tests that you are trying to run within the same Job as the Job that installs the node modules?

I was trying to separate my node setup(npm install) and the actual running of tests into two Jobs, which resulted in the node modules living in one build_dir and when the testing job was being ran, it was trying to do so within a different build_dir. Because the two jobs operated on two different build_dir's, when it came to running the tests, Bamboo could not find the appropriate modules.

 

My solution was to remove the second Job and put everything(separated by tasks) into one Job. 

Hi Logan,

This has been found to be a bug. I contacted support regarding it. They filed a bug report: https://jira.atlassian.com/browse/BAM-18099

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

694 views 1 6
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