Unable to see Test results


#1

I am able to build project success fully , but not able to see test results.The test results folder is empty, how to resolve that issue.


#2

Be happy to try and help, but we need a little bit more info.

Build url (if public)
Command to run tests
Circle.yml file sections related to the issue.


#3

https://circleci.com/gh/rchennuri/podam/tree/master

circle.yml

machine:
  ruby:
    version: rbx-2.2.6

test:
  post:
    - bundle exec rake spinach:
        environment:
          RAILS_ENV: test
test:
  minitest_globs:
    - test/integration/**/*.rb
    - test/extra-dir/**/*.rb

test:
  override:
    - mkdir -p $CIRCLE_TEST_REPORTS/cucumber:
        parallel: true
    - bundle exec cucumber --format json --out $CIRCLE_TEST_REPORTS/cucumber/tests.cucumber:
        parallel: true
        files:
          - spec/feature/*.feature
test:
  post:
    - mkdir -p $CIRCLE_TEST_REPORTS/junit/
    - find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;

#4

I may have to leave this one for staff, but try running the post find in paralell as well.

I’d also try adding $CIRCLE_TEST_RESULTS to artifacts as well, just to make sure the junit file is making it in there.


#5

Actually…cucumber isnt being ran. Does the paralell modifier cause it to not run if you are only using one container?


#6

It should just ignore it, but I would remove it just to be safe. @rchennuri can you try to remove the parallel modifier?


#7

HI Team,

I have removed parallel modifier, still it’s not working.
How can i add gem file to my project.


#8

I am seeing this message in test results tab.

**With some of our inferred build commands we collect test metadata automatically, but that didn't happen for this project. Collecting metadata allows us to list the specific failures, and in some cases makes parallel builds more efficient. Here's how to get it:**
For an inferred ruby test command, simply add the necessary formatter gem
Python should work automatically, except for django you'll need to use django-nose.
For another inferred test runner that you'd like us to add metadata support for, let us know.
For a custom test command, configure your test runner to write a JUnit XML report to a directory in $CIRCLE_TEST_REPORTS - see the docs for more information.

#9

Did you try adding

general:
   artifacts:
     - $CIRCLE_TEST_REPORTS

To make sure the test results are being created?


#10

I am new to circle CI , i have added above lines also , it didn’t worked for me , please do the needful.

this is my public access url of GIT.


#11

Your tests are being dumped in failsafe-reports, not surefire-reports, that’s why.

I don’t know enough about java to know why, but this circle.yml code will fix at least that part for you:

machine:
  ruby:
    version: rbx-2.2.6

test:
  minitest_globs:
    - test/integration/**/*.rb
    - test/extra-dir/**/*.rb
  post:
    - mkdir -p $CIRCLE_TEST_REPORTS/junit/
    - find . -type f -regex ".*/target/failsafe-reports/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;

#12

#13

Thank you very much…:grinning:


#14

I am new to Circle CI. And i am running the tests. Please send me any documents you have for help .I am a beginner. Do not know what start container is for , etc.,


#15

The best place to start is here.


#16