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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,552,108
Community Members
 
Community Events
184
Community Groups

Failing test step do not show all logs

Hello,

I have a monorepo setup which runs a large set of tests on commits to master. If a test fails I don't receive the full output of the failing test suite, in the logs of the pipline, so cannot determine what test failed.

Does anyone know why I wouldn't be getting the full  all the logs? It consistently happens running React unit tests with React Testing Library using the circleci/node:16.7-browsers image. Here is the step definition:

 

- step:
name: Run tests
image: circleci/node:16.7-browsers
size: 2x
script:
- npm run test

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 19, 2022

Hi @Adam Whiteland,

I'm not really sure what output you are missing from the Pipelines log. Do you see additional output when you run these failed tests locally that is not in the Pipelines log?

If you have a computer with more than 4GB memory available, I would suggest as a first step to debug this build locally with the same Docker image, and see if you get the same output as in Pipelines or not.

You can do this the following way:

1. Take a new clone of the repo on your machine (don't use an existing one)

2. Navigate to the directory of that new clone, and do a git reset --hard to the commit of the failed build with the issue

3. Afterwards, start a Docker container with the following command

docker run -it --volume=/Users/myUserName/code/my-repo:/localDebugRepo --workdir="/localDebugRepo" --memory=4g --memory-swap=4g --memory-swappiness=0 --cpus=4 --entrypoint=/bin/bash circleci/node:16.7-browsers

Replace /Users/myUserName/code/my-repo in the command with the path of the clone you took on step 1.

4. After the Docker container starts, you can run the commands of the script in your yml file (in this case npm run test) and observe the output. Do you see in the output of that command additional output that is not in the Pipelines log?

Kind regards,
Theodora

Thanks for your reply @Theodora Boudale, I'll definitely give this a go and get back to you with my results.

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 21, 2022

You are very welcome Adam, I will wait for your update then! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events