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 <tdono...@duraspace.org
<mailto:tdono...@duraspace.org>> 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
(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 dspace-tech+unsubscr...@googlegroups.com
<mailto:dspace-tech+unsubscr...@googlegroups.com>.
To post to this group, send email to dspace-tech@googlegroups.com
<mailto:dspace-tech@googlegroups.com>.
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 dspace-tech+unsubscr...@googlegroups.com
<mailto:dspace-tech+unsubscr...@googlegroups.com>.
To post to this group, send email to dspace-tech@googlegroups.com
<mailto:dspace-tech@googlegroups.com>.
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 dspace-tech+unsubscr...@googlegroups.com
<mailto:dspace-tech+unsubscr...@googlegroups.com>.
To post to this group, send email to dspace-tech@googlegroups.com
<mailto:dspace-tech@googlegroups.com>.
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 dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.