Git Product home page Git Product logo

Comments (9)

Whathecode avatar Whathecode commented on May 24, 2024 1

Possibly related:

While implementing test classes for carp.client.core I now also had to implement a InMemoryDeploymentRepository. This could ideally be tested through the DeploymentRepositoryTest interface provide in carp.deployment.core tests.

How can this be referenced?

from carp.core-kotlin.

Whathecode avatar Whathecode commented on May 24, 2024 1

Similarly, it should be possible to create a base class for <ApplicationService>RequestsTest for each of the application services.

from carp.core-kotlin.

Whathecode avatar Whathecode commented on May 24, 2024 1

Being able to depend on test resources of a project within the same build would resolve this, but I am having an extremely hard time figuring out how to do this.

Posted on Stack Overflow: How to add dependencies to tests of another project in a multi-platform multi-project Kotlin build

from carp.core-kotlin.

Whathecode avatar Whathecode commented on May 24, 2024 1

Since being able to depend on test resources of a project does not seem to have high priority, I already went ahead and moved common protocols test sources to the infrastructure namespace of carp.protocols: https://github.com/cph-cachet/carp.core-kotlin#stub-classes

There might still be merit in refactoring <ApplicationService>RequestsTest to a common base class, which currently is not possible since it relies on kotlin.test and aren't just some test stubs which are reused, independent from the test framework used. Therefore, I will leave this open for now.

from carp.core-kotlin.

Whathecode avatar Whathecode commented on May 24, 2024 1

Similarly, it should be possible to create a base class for <ApplicationService>RequestsTest for each of the application services.

Ran into this again while adding tests for ParticipationService. I think it is time to figure out which dependencies it has and maybe add a carp.common.test which depends on carp.test submodule to at least remove this duplication across all application services right now. It could test common DDD patterns.

from carp.core-kotlin.

Whathecode avatar Whathecode commented on May 24, 2024 1

Currently, integration tests of infrastructure building on top of CARP core needs to retest some of the post conditions of requests on application services.

In case we include a test resources module to CARP core, we could expose post condition checks for operators to centralize these tests.

from carp.core-kotlin.

Whathecode avatar Whathecode commented on May 24, 2024 1

More common test logic: ApplicationServiceReflectionTest is copied to each subsystem's JVM tests.

This can currently not be centralized in carp.test because it relies on accessing the ApplicationService and IntegrationEvent type defined in carp.common, and carp.test does not depend on carp.common, and cannot since this would be a bidirectional dependency.

from carp.core-kotlin.

Whathecode avatar Whathecode commented on May 24, 2024 1

The limitation of not being able to publish test sources has to do with Kotlin multiplatform. But, is it perhaps possible to publish the JVM test sources separately instead?

from carp.core-kotlin.

Whathecode avatar Whathecode commented on May 24, 2024

Some of these issues have been resolved. I added a 🚀 to each underlying issue for which a suitable solution has been found. I added 👀 to those which still need attention.

However, for the time being, given that Kotlin multiplatform doesn't allow linking to common test sources, I don't see an immediate solution, other than for each module (e.g., carp.deployments.core) creating a corresponding *.test module.

from carp.core-kotlin.

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.