[GeoNetwork-devel] Say it with a... test

Dear all,

I don’t know if you noticed, but recently GeoNetwork code-base got a new component: an integration test software, based on Cucumber and Selenium.
The idea is to have high level tests, based on browser automation: easy to write, easy to maintain and to test GeoNetwork like real users would do: by opening a browser to use its functionalities.

There are already some tests to take as example, that cover core functionalities of GeoNetwork. I invite you to contribute with more test cases, especially if you are an end user and a specific functionality is very important to you: show your love with a test!

Together with unit tests, the integration tests could help to keep GeoNetwork project stable and to avoid regressions.

When is the best time to run integration tests? Consider that they needs some extra time compared to unit tests, so it’s not a good idea to run them automatically for each pull request. The ideal is to run them, manually, before a merge or at the end of some automation tool, like Jenkins (for example after a nightly build). Also consider that, to be deterministic, the integration test needs a running and clean instance of a standard GeoNetwork: a clean DB, no customization, no weird stuff.

Let’s take some time to refine the idea, to discuss it, to improve it… Please, feel free to join the discussion. I really think that this could be good for GeoNetwork and as extra help for project maintainers, that already do a great work into keeping it healthy.

Kind regards,

Antonio Cerciello

···


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664

GeoCat bv
http://geocat.net

Hi,

Very good thanks, I how it helps to get UI more stable.

I think we need rules about test file name, maybe organize tests in subfolders.
998.cleanup.feature is not relevant, what is 998 ? What clean up about ? I think we must start to do it properly or we gonna get lost in all test files.

···

On Thu, Feb 15, 2018 at 1:17 PM, Antonio Cerciello <antonio.cerciello@anonymised.com> wrote:

Dear all,

I don’t know if you noticed, but recently GeoNetwork code-base got a new component: an integration test software, based on Cucumber and Selenium.
The idea is to have high level tests, based on browser automation: easy to write, easy to maintain and to test GeoNetwork like real users would do: by opening a browser to use its functionalities.

There are already some tests to take as example, that cover core functionalities of GeoNetwork. I invite you to contribute with more test cases, especially if you are an end user and a specific functionality is very important to you: show your love with a test!

Together with unit tests, the integration tests could help to keep GeoNetwork project stable and to avoid regressions.

When is the best time to run integration tests? Consider that they needs some extra time compared to unit tests, so it’s not a good idea to run them automatically for each pull request. The ideal is to run them, manually, before a merge or at the end of some automation tool, like Jenkins (for example after a nightly build). Also consider that, to be deterministic, the integration test needs a running and clean instance of a standard GeoNetwork: a clean DB, no customization, no weird stuff.

Let’s take some time to refine the idea, to discuss it, to improve it… Please, feel free to join the discussion. I really think that this could be good for GeoNetwork and as extra help for project maintainers, that already do a great work into keeping it healthy.

Kind regards,

Antonio Cerciello


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664

GeoCat bv
http://geocat.net


Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


GeoNetwork-devel mailing list
GeoNetwork-devel@…537…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

camptocamp
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

Florent Gravin
+33 4 58 48 20 36

On Tue, Feb 20, 2018 at 10:06 AM, Florent Gravin <
florent.gravin@anonymised.com> wrote:

Hi,

Very good thanks, I how it helps to get UI more stable.

I think we need rules about test file name, maybe organize tests in
subfolders.
998.cleanup.feature
<https://github.com/geonetwork/core-geonetwork/blob/3.4.x/integration-test/src/test/resources/features/998.cleanup.feature&gt; is
not relevant, what is 998 ? What clean up about ? I think we must start to
do it properly or we gonna get lost in all test files.

Tests are executed in alphabetical order. That's why the numbers.

Also, as the name says, this test does a cleanup of previously generated
users, groups and metadata that are being recurrently used in previous
tests. Also, each test have comments inside, like:

https://github.com/geonetwork/core-geonetwork/blob/3.4.x/integration-test/src/test/resources/features/998.cleanup.feature#L2

Hi,

it’s not a bad idea to be more explicit on some basic conventions for writing tests.

I proposed some in the PR: https://github.com/geonetwork/core-geonetwork/pull/2578

···

On Tue, Feb 20, 2018 at 10:11 AM, María Arias de Reyna <delawen@anonymised.com> wrote:

On Tue, Feb 20, 2018 at 10:06 AM, Florent Gravin <florent.gravin@anonymised.com> wrote:

Hi,

Very good thanks, I how it helps to get UI more stable.

I think we need rules about test file name, maybe organize tests in subfolders.
998.cleanup.feature is not relevant, what is 998 ? What clean up about ? I think we must start to do it properly or we gonna get lost in all test files.

Tests are executed in alphabetical order. That’s why the numbers.

Also, as the name says, this test does a cleanup of previously generated users, groups and metadata that are being recurrently used in previous tests. Also, each test have comments inside, like:

https://github.com/geonetwork/core-geonetwork/blob/3.4.x/integration-test/src/test/resources/features/998.cleanup.feature#L2

Kind regards,

Antonio Cerciello


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664

GeoCat bv
http://geocat.net