Hi,
I didn't check all modules, but for the most part of them the test are
skipped just because there is no test to do, look for example the part of
the output of the "mvn test". Pantelis, did run the DSpace 5? I guess you
have to test your on? Did you do tests on JSPUI?
[INFO]
------------------------------------------------------------------------
[INFO] Building DSpace XML-UI Mirage2 Theme 6.0-rc2-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-java) @
dspace-xmlui-mirage2 ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-versions) @
dspace-xmlui-mirage2 ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @
dspace-xmlui-mirage2 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/Users/luizfr/Development/ideaprojects/dspace-pre-6/dspace-xmlui-mirage2/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @
dspace-xmlui-mirage2 ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources)
@ dspace-xmlui-mirage2 ---
[INFO] Not copying test resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @
dspace-xmlui-mirage2 ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @
dspace-xmlui-mirage2 ---
[INFO] Tests are skipped.
On Tue, Jun 7, 2016 at 1:16 PM, Luiz dos Santos <[email protected]> wrote:
> Hi Tim,
>
> I already used the plugin below, but I didn't test it in DSpace, let me
> try test and I can submit a pull request later.
>
> Best
> Luiz
>
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.19.1</version>
> <configuration>
> <skipTests>true</skipTests>
> </configuration>
> </plugin>
>
>
>
> On Tue, Jun 7, 2016 at 1:09 PM, Tim Donohue <[email protected]>
> wrote:
>
>> Hi Luiz,
>>
>> As far as I'm aware, that's just how a Maven test runs. It automatically
>> will try to run tests in all modules, but it only will execute ones that it
>> finds. So, most modules will report that no tests were found. I'm unaware
>> of any way to change that behavior in Maven (if you know of one, let us
>> know).
>>
>> Also, be aware that we have Unit / Integration Tests disabled by default
>> in our Maven POM settings. So, to actually run tests, you need to apply a
>> flag to enable them:
>>
>> - "-Dmaven.test.skip=false" will enable Unit Tests to run (via Maven
>> Surefire Plugin)
>> - "-DskipITs=false" will enable Integration Tests to run (via Maven
>> Failsafe Plugin)
>>
>> These flags are both standard Maven flags, but we have configured both to
>> be set to "true" by default.
>>
>> So, to run both, you can simply run:
>>
>> "mvn install -Dmaven.test.skip=false -DskipITs=false"
>>
>> Again, a sample of running tests can be found in our Travis settings:
>>
>> https://github.com/DSpace/DSpace/blob/master/.travis.yml
>> - Tim
>>
>>
>> On 6/7/2016 9:53 AM, Luiz dos Santos wrote:
>>
>> Hi Tim,
>>
>> Pantelis send me the e-mail below with a question, basically he is
>> asking why "mvn test" run for all module if ti run for the dspace-api and
>> dspace-service only? Any idea?
>>
>> Best regards
>> Luiz
>>
>>
>>
>> Tests (mvn test) run ok when executed both in [dspace-src] and
>> [dspace-src]/dspace directories.
>> My question why do they run for every project (SWORD, SWORDv2, REST,
>> Services Framework, Kernel etc.) while there seem to be test folders only
>> for api, oai, services and rest:
>>
>> (master)$ pwd
>> /home/pkaramol/Workspace/dspace/dspace-src
>> (master)$ tree -L 1
>> .
>> ├── dspace
>> ├── dspace-api
>> ├── dspace-jspui
>> ├── dspace-oai
>> ├── dspace-rdf
>> ├── dspace-rest
>> ├── dspace-services
>> ├── dspace-solr
>> ├── dspace-sword
>> ├── dspace-swordv2
>> ├── dspace-xmlui
>> ├── dspace-xmlui-mirage2
>> ├── LICENSE
>> ├── LICENSE_HEADER
>> ├── LICENSES_THIRD_PARTY
>> ├── local.cfg
>> ├── local.cfg.EXAMPLE
>> ├── NOTICE
>> ├── pom.xml
>> ├── README.md
>> └── src
>>
>> 13 directories, 8 files
>> (master)$ find . -name "test" -type d
>> ./dspace-api/src/test
>> ./dspace-oai/src/test
>> ./dspace-services/src/test
>> ./dspace-services/src/test/java/org/dspace/test
>> ./dspace-rest/src/test
>>
>> On Tue, Jun 7, 2016 at 10:46 AM, Tim Donohue <[email protected]>
>> wrote:
>>
>>> Hi P.K.,
>>>
>>> Currently, DSpace only really has Unit / Integration tests for the main
>>> Java API layers, specifically these two modules/JARs:
>>>
>>> https://github.com/DSpace/DSpace/tree/master/dspace-api (creates
>>> dspace-api.jar)
>>>
>>> https://github.com/DSpace/DSpace/tree/master/dspace-services (creates
>>> dspace-services.jar)
>>>
>>> Unfortunately, we do not have Unit / Integration tests for the user
>>> interfaces (XMLUI or JSPUI). Both of these interfaces are now quite old,
>>> and the plan is to replace them in the near future with a new User
>>> Interface (see RoadMap [1] and UI Prototype Challenge [2]). My goal would
>>> be that the new User Interface *will* have an automated testing framework.
>>> Obviously, that's the recommended route these days.
>>>
>>> As for running the tests, we do use Travis CI to run our automated
>>> Unit/Integration tests for the API layer. Our Travis config can be found
>>> in the codebase at:
>>>
>>> https://github.com/DSpace/DSpace/blob/master/.travis.yml
>>>
>>> The Travis config provides all the information you should need on how to
>>> trigger running the tests. The documentation for the testing framework is
>>> a bit outdated, but it is still based on the notes at
>>> <https://wiki.duraspace.org/display/DSPACE/DSpace+Testing>
>>> https://wiki.duraspace.org/display/DSPACE/DSpace+Testing (We still use
>>> all the technologies mentioned there, though the versions have been updated
>>> as has the code as well)
>>>
>>> If you have further questions, feel free to ask them on this list, and
>>> we'll try to get them answered!
>>>
>>> Tim
>>>
>>> [1] https://wiki.duraspace.org/display/DSPACE/RoadMap
>>> [2]
>>> https://wiki.duraspace.org/display/DSPACE/DSpace+UI+Prototype+Challenge
>>>
>>> On 6/6/2016 10:56 AM, Pantelis Karamolegkos wrote:
>>>
>>> Assuming someone wants to fork and proceed with heavy DSpace
>>> customization, what is the recommended testing strategy?
>>> i.e. which of the tests should be kept in a CI environment like travis?
>>> (apart from our own custom tests we may set up)
>>> (note: 99% of the customization will most likely take place on jspui)
>>> Is there any documentation on dspace's (Unit/Integration) tests?
>>>
>>> Thx,
>>>
>>> P.K.
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "DSpace Technical Support" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to <[email protected]>
>>> [email protected].
>>> To post to this group, send email to <[email protected]>
>>> [email protected].
>>> Visit this group at https://groups.google.com/group/dspace-tech.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
>>> Tim Donohue
>>> Technical Lead for DSpace & DSpaceDirect
>>> DuraSpace.org | DSpace.org | DSpaceDirect.org
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "DSpace Technical Support" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to <[email protected]>
>>> [email protected].
>>> Visit this group at https://groups.google.com/group/dspace-tech.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "DSpace Technical Support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/dspace-tech.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> Tim Donohue
>> Technical Lead for DSpace & DSpaceDirect
>> DuraSpace.org | DSpace.org | DSpaceDirect.org
>>
>>
>
--
You received this message because you are subscribed to the Google Groups
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.