Help Needed to find solution to questions


#1

1 Question : “I am trying to get my test cases to show up on
CircleCI but it is not working. I have a fork of this project in my
github account https://github.com/mtedone/podam. I added the project to CircleCI and got a green build but the Test Results tab is empty”

2nd Question : I added my project to CircleCI but I can’t get the build
complete. I’m not sure what I’m doing wrong. Can you help? My project is
https://github.com/nym2015/commons-csv.

Will appreciate your help .


#2

Hi there,

1st question:
You should be able to get your test results to show up by following the steps shown here.

2nd question:

  • Can you please provide more information about the issue you are having?
  • Are builds getting triggered by GitHub pushes?
  • Are you seeing any errors in the build output? Are there any commands that are timing out? If so, can you share the relevant commands and paste the build output here?

#3

1st question : I tried adding below circle.yml but still test results are not showing

test:
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex “.*/target/surefire-reports/.*xml” -exec cp {} $CIRCLE_TEST_REPORTS/junit/ ;

2nd question :The build dosen’t pass the $ mvn integration-test

Yes, it is timed out , running for past an hour :open_mouth:


#4

…command ((mvn “integration-test”)) took more than 120 minutes to run

Why does the command take so long to run?


#5

Hi @Terminal_Adawe ,

It is taking lot of time to run because of this code in circle.yml file

private void validate() throws IllegalArgumentException {

  •    for (int i=0; i<20*60*60; i++) {
    
  •        System.out.print('.');
    
  •        try {
    
  •            Thread.currentThread().sleep(1000);
    
  •        } catch (InterruptedException e) {
    
  •            break;
    
  •        }
    
  •    }
    

This method is called upon lot of time , which causing a loop .Change the loop with something like below and build will execute in 2 minutes

private void validate() throws IllegalArgumentException {

  •    for (int i=0; i<100; i++) {
    
  •        System.out.print('.');
    
  •        try {
    
  •            Thread.currentThread().sleep(1);
    
  •        } catch (InterruptedException e) {
    
  •            break;
    
  •        }
    
  •    } 
    

Regards,
Devendra


#6

I’m new to testing and I’m working on the same problem. However, using Frank’s solution for the first question still doesn’t solve it. The test runs successfully but there are no test results. Please advise.

Can you also explain why we are using the code to generate test reports for Maven based projects? The earlier code was for custom Cucumber steps.


#7

Hi kesavaraom ,

You need to turn on Maven Surefire Plugin in pov.xml file to see artifacts.
Go to Pov.xml and search for maven-surefire-plugin .
You will see below snippet of code on it
maven-surefire-plugin</artifactId>
<> version>2.11</ version>

true<*skip>

Remove below 3 lines to activate surfire-plugin

true<*skip>

After doing this I believe , you will be able to see artifacts .
Regards,
Devendra


#8

Hi Devendra,

Removing the line for “true - skip” worked. Thanks a lot. What about the second problem? I could not find any way to solve it.

Thanks,
Kesava


#9

@kesavaraom Refer to 5th post in this topic


#10

Related if still having issues: Building Podam on CircleCI


#11

Hi,

I am facing the second issue.I do not have sleep in circle.yml file.Not sure why is it still in build state?Plz help


#12

@srivathsani : Can you email me cirlcle.yml file , i will take look at it & will revert back .


#13

Hi Devendra, I am also facing the same issue. Did the issue being discussed here, got sorted? Could you pls help


#14

I have changed the loop as below and so far the build looks good…

private void validate() throws IllegalArgumentException {
for (int i=0; i<20; i++) {
System.out.print(’.’);
try {
Thread.currentThread().sleep(10);
} catch (InterruptedException e) {
break;
}
}

keeping my fingers crossed…


#15

You know what I have kept he iteration to a much more lower value and the Build has completed fine.
Thanks,
Aman


#16

Hi @DevendraMeena1,

I am working on the same problems and need your help on it… I have added the same script in my circle.yml file and also modified pom.xml file as per your suggestions… however my build is still unsuccessful… :frowning: I see a warning message as “We couldn’t detect the settings for your project! Please make sure you have a circle.yml configuration file in place”. Also, I am assuming that since my build has failed, I do not see any artifacts either… appreciate your prompt response…

thanks in Advance.
Udaya


#17

@amansahni1 , @srivathsani could you please help me move ahead?


#18

Hi @DevendraMeena1 when I try to build the podam, I get the error: “Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:resolve-plugins (resolve-plugins) on project podam: Nested: Could not find artifact org.eclipse.mylyn.github:org.eclipse.egit.github.core:jar:3.1.0.201310021548-r in central (https://repo.maven.apache.org/maven2)”.

Kindly help. I am new to this!


#19

looks like CircleCI forum is too slow in race!


#20