Giter Club home page Giter Club logo

Comments (6)

bmalinowsky avatar bmalinowsky commented on June 12, 2024

For most use-cases, its probably better to skip them, together with signing

mvn clean install -DskipTests -Dgpg.skip=true

Testing the communication protocols requires various endpoints at different layers. Most users won't have the complete required set of interfaces, e.g., for testing FT 1.2, or Routing, as well as endpoint setup. So, if an interface is not found, all (or almost all) unit tests for that category will fail.

You can see in some of the previous commits that I modified tests for a virtual subnet. This allows KNXnet/IP and KNX IP unit tests to execute completely in software. It requires the calimero-server and calimero-device.
So yes, there exists a setup in software that allows most tests to run. But I cannot directly include the test setup, because then maven complains about circular dependencies (calimero-core <--> calimero-server <--> calimero-device).

Also note that a complete test run, due to tests of heart-beating, mgmt procedures, etc. takes around 20 minutes.

Another point you raised is with other KNX interfaces. Interfaces that do not participate in unit tests should actually be ignored. I will fix that in the test setup.

from calimero-core.

ouaibsky avatar ouaibsky commented on June 12, 2024

Ok, Thx for the update.

Yes I can skip unit test, but it's nice to have them and safe when we want to do some refactoring.
Do you think it can be valuable to "group" UT (for example UT that require nothing special, those related to FT 1.2, ...) then to execute by default the default then execute other by activating some maven profile
Grouping can be done with junit category

My point is just to look if we can avoid to exclude all tests everytime.

For gpg it can make sens as well to disable it by default and activate only when u want to release. I'm gonna have a look.

from calimero-core.

teichsta avatar teichsta commented on June 12, 2024

For gpg it can make sens as well to disable it by default and activate only when u want to release. I'm gonna have a look.

you could use maven profiles for that …

from calimero-core.

bmalinowsky avatar bmalinowsky commented on June 12, 2024

UT grouping is probably a good way to go.
Problem: IIRC(!) the only way to enforce grouping is via annotations. The current UTs are based on junit 3. And annotations on junit 3 tests are ignored. Mixing ju3/4 is not ideal. I will look into this.

For a quick workaround you might try to put exclusion patterns into a property of a new profile of your pom, together with the surefire plugin, which supports this:
http://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html .
(This never worked reliably for me, but maybe it works for you.)

from calimero-core.

ouaibsky avatar ouaibsky commented on June 12, 2024

PR done for GPG: calimero-project/calimero.parent#1

from calimero-core.

bmalinowsky avatar bmalinowsky commented on June 12, 2024

gpg, junit categories, as well as unrelated knx interfaces during testing should be covered now (on j8 branch). Closing this.

from calimero-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.