Comments (9)
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.
Similarly, it should be possible to create a base class for <ApplicationService>RequestsTest
for each of the application services.
from carp.core-kotlin.
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.
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.
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.
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.
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.
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.
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)
- Should `DeviceRegistration` include freeform specification data? HOT 7
- `StudyStatus.Configuring.canGoLive` should check for more data HOT 6
- Can't find device with role name 'location_service' in snapshot. HOT 2
- Change invitations after study has gone live
- Use new JSON unquoted literal in `UnknownPolymorphicSerializer`
- TypeScript types passed between modules cause incompatible type warning requiring cast to `any` HOT 1
- Deserializing Measurement fails when using custom data types HOT 5
- TypeScript export for `Nullable` is missing HOT 7
- Need to know the version tag for a StudyProtocolSnapshot HOT 1
- Add phone number input data type HOT 3
- Redundant data type descriptors on data stream data points
- Add informed consent input data type HOT 1
- Add Social Security Number as Input Data Type HOT 4
- Inherited properties are missing from StudyProtocolSnapshot TS class
- Add participants to studies identified through other mechanisms than email HOT 4
- Consistent formatting for JSON type identifiers
- Disallow custom/extending types in CARP namespaces
- Specify input data type for `CustomParticipantAttribute` instead of generating one
- Allow study subsystem to retrieve input elements for participant attributes
- Personal identifiable information (PII) in the deployment subsystem
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carp.core-kotlin.