STAMP-project / evosuite-ramp-tutorial

This repository contains the tutorial material to run EvoSuite using behavioural models seeding.
0 stars 1 forks source link

Explain how to get the binaries #1

Closed vmassol closed 5 years ago

vmassol commented 5 years ago

The doc says to run:

java -d64 -Xmx10000m -jar bin/botsing-model-generation-1.0.4-SNAPSHOT-jar-with-dependencies.jar ...

and

java -d64 -Xmx4000m -jar bin/evosuite-master-1.0.7-SNAPSHOT.jar ...

but it doesnt say where to get these JARs.

I've tried to build botsing in the hope of getting the first one (botsing-model-generation-1.0.4-SNAPSHOT-jar-with-dependencies.jar) but I get:

[INFO] Botsing ............................................ SUCCESS [  5.676 s]
[INFO] botsing-commons .................................... FAILURE [  3.797 s]
[INFO] botsing-examples ................................... SKIPPED
[INFO] botsing-reproduction ............................... SKIPPED
[INFO] Botsing Maven Plugin ............................... SKIPPED
[INFO] botsing-preprocessing .............................. SKIPPED
[INFO] botsing-model-generation ........................... SKIPPED
[INFO] botsing-parsers .................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  9.654 s
[INFO] Finished at: 2019-04-02T14:43:28+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project botsing-commons: Could not resolve dependencies for project eu.stamp-project:botsing-commons:jar:1.0.5-SNAPSHOT: Could not find artifact org.evosuite:evosuite-client-botsing:jar:1.0.7 in xwiki-releases (http://nexus.xwiki.org/nexus/content/groups/public) -> [Help 1]

This seems to indicate that evosuite 1.0.7 is not present in Maven Central. Indeed when I search I only see version 1.0.6. https://search.maven.org/search?q=evosuite and https://search.maven.org/search?q=evosuite-client-botsing is not there at all.

I'll now try to build evosuite too which I've found at https://github.com/EvoSuite/evosuite.

vmassol commented 5 years ago

I'll now try to build evosuite too which I've found at https://github.com/EvoSuite/evosuite.

There's no 1.0.7 tag! See https://github.com/EvoSuite/evosuite/releases

And evosuite master has 1.0.7-SNAPSHOT as the version so something is amiss...

EDIT: There's actually no evosuite-client-botsing module!

vmassol commented 5 years ago

Ok found the "Building Botsing" section on https://github.com/STAMP-project/botsing... Trying.... (painful)

vmassol commented 5 years ago

Ok I was able to build Botsing and finding the botsing-model-generation-1.0.5-SNAPSHOT-jar-with-dependencies.jarJAR:

vmassol ~/dev/botsing (master) $ find . -name "*.jar"
./botsing-commons/target/botsing-commons-1.0.5-SNAPSHOT.jar
./botsing-model-generation/target/botsing-model-generation-1.0.5-SNAPSHOT-jar-with-dependencies.jar
./botsing-model-generation/target/botsing-model-generation-1.0.5-SNAPSHOT.jar
./botsing-parsers/target/botsing-parsers-1.0.5-SNAPSHOT.jar
./botsing-reproduction/evosuite-client-botsing-1.0.6.jar
./botsing-reproduction/evosuite-client-botsing-1.0.7.jar
./botsing-reproduction/target/botsing-reproduction-1.0.5-SNAPSHOT-tests.jar
./botsing-reproduction/target/original-botsing-reproduction-1.0.5-SNAPSHOT.jar
./botsing-reproduction/target/botsing-reproduction-1.0.5-SNAPSHOT.jar
./botsing-preprocessing/target/botsing-preprocessing-1.0.5-SNAPSHOT-jar-with-dependencies.jar
./botsing-preprocessing/target/botsing-preprocessing-1.0.5-SNAPSHOT.jar
./botsing-maven/target/botsing-maven-1.0.5-SNAPSHOT.jar
./botsing-examples/target/classes/sample_dep/projectA-1.0-SNAPSHOT.jar
./botsing-examples/target/classes/sample_dep/projectA-1.0-SNAPSHOT-tests.jar
./botsing-examples/target/botsing-examples-1.0.5-SNAPSHOT.jar
./botsing-examples/src/main/resources/sample_dep/projectA-1.0-SNAPSHOT.jar
./botsing-examples/src/main/resources/sample_dep/projectA-1.0-SNAPSHOT-tests.jar

Now trying to build evosuite to get the other one.

vmassol commented 5 years ago

Ok was also able to build evosuite to get ./master/target/evosuite-master-1.0.7-SNAPSHOT.jar.

vmassol commented 5 years ago

Globally took me 30mn to get these 2 JARs. Would be great to improve the doc to speed this up :) (and to make these jars available somewhere if they're not already).

vmassol commented 5 years ago

Suggestion to create the classpath (on Mac):

CLASSPATH=$(find "." -name '*.jar' | xargs echo | tr ' ' ':')

See also https://stackoverflow.com/questions/4729863/using-bash-how-do-you-make-a-classpath-out-of-all-files-in-a-directory

xdevroey commented 5 years ago

Hi @vmassol, the jars are available in this (current) repository https://github.com/STAMP-project/evosuite-model-seeding-tutorial/tree/master/bin.

If you want to build EvoSuite from the sources, you can use the fork https://github.com/STAMP-project/evosuite. We will do a pull request to include our changes in the EvoSuite main repository but we have to clean up the git history first.

vmassol commented 5 years ago

Hi @vmassol, the jars are available in this (current) repository https://github.com/STAMP-project/evosuite-model-seeding-tutorial/tree/master/bin.

Cool. I didn't find that info in the tutorial, did I miss it?

xdevroey commented 5 years ago

The first step is to clone the tutorial repository but did not said that the binaries are there. I will detail where to find the binaries in the explanation.

vmassol commented 5 years ago

The first step is to clone the tutorial repository

Ok but my problem is that I don't want to do that ;) I'm sure the tutorial works since you tested it! What I wanted to do was run it on my example (i.e. XWiki).

MaelAudren commented 5 years ago

I had the same issue for finding the binary. Thanks @vmassol and @xdevroey for having already clarified this issue.

pderakhshanfar commented 5 years ago

@MaelAudren I managed to make a fat jar and test jar of ProActive Commons-api by adding these two tasks int to the build.gradle which exists in proactive⁩ ▸ ⁨scheduling⁩ ▸ ⁨common⁩ ▸ ⁨common-api⁩:


task fatJar(type: Jar){
    manifest {
            attributes("Implementation-Title": "ProActive",
                    "Implementation-Version": version,
                    "Specification-Version": version,
                    "Implementation-Vendor": "Activeeon - OASIS - INRIA Sophia Antipolis",
                    "Implementation-URL": "http://proactive.inria.fr"
            )
        }
                     baseName = project.name + '-all'
        from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
        with jar
}

task testJar(type: Jar) {
    classifier = 'tests'
    from sourceSets.test.output
}
MaelAudren commented 5 years ago

@pderakhshanfar I was talking about https://github.com/STAMP-project/evosuite-model-seeding-tutorial/blob/master/bin/evosuite-master-1.0.7-SNAPSHOT.jar. I had no issue to get ProActive binaries.