GithubHelp home page GithubHelp logo

Testing strategies about kalix-jvm-sdk HOT 10 CLOSED

lightbend avatar lightbend commented on September 27, 2024
Testing strategies

from kalix-jvm-sdk.

Comments (10)

octonato avatar octonato commented on September 27, 2024 1

That's fine. It's good to try it locally first since interacting with CI is mostly a slow process.

Ultimately, whatever strategy we pick, we want it running on CI and that for each PR.

from kalix-jvm-sdk.

franciscolopezsancho avatar franciscolopezsancho commented on September 27, 2024

I'll start creating a script that

  • clones the java-sdk
  • install the archetypes on local
  • generate a new project from that local archetype
  • run both tests (unit and it)
  • and copy the relevant files from samples (maybe one by one starting with the Impl) while running the tests.

from kalix-jvm-sdk.

octonato avatar octonato commented on September 27, 2024

You mean one script that does that all?

This is better done by the CI using its scripting facilities. At the end, it's the same, but there are a few other things already in place.

from kalix-jvm-sdk.

franciscolopezsancho avatar franciscolopezsancho commented on September 27, 2024

I don't know how many of all the cases we are going to tackle with this but I thought it could be a useful first iteration. I totally agree that done in CI is the way to go. What I thought is first testing all this in local to have it fleshed out and later if we find it useful, yeah, moving it to CI. Makes sense or you would rather start developing it in CI?

from kalix-jvm-sdk.

franciscolopezsancho avatar franciscolopezsancho commented on September 27, 2024

I created #57 to start with, @octonato
I think I need to do a couple of tests before I copy all the files (it, unit tests and CounterImpl) but this is close to what we were discussing, I think.

from kalix-jvm-sdk.

franciscolopezsancho avatar franciscolopezsancho commented on September 27, 2024

In the Makefile we have run-test-impl that tests if sample and codegen are in sync. In order for this to work the codegen should not create test asserting for failure. I uploaded the file trinity/src/test/com/example/domain/CounterTest.java which has an implementation that passes as long as the CounterImpl contains the required methods. If the codegen would create such a file CounterTest we then could run-test-impl and test the sample is in sync with the codegen. LMKWYT

from kalix-jvm-sdk.

franciscolopezsancho avatar franciscolopezsancho commented on September 27, 2024

I removed the mocking creation from the codegen. This is how it would look the PR https://github.com/franciscolopezsancho/akkaserverless-codegen/pull/1

from kalix-jvm-sdk.

franciscolopezsancho avatar franciscolopezsancho commented on September 27, 2024

I added to that PR:

  • generation of Tests and [Counter]Impl such is not mocking anything and mvn verify pass in a clean project
  • generation of Main. It was broken by missing SERVICE variable. mvn verify -Pit pass in a clean project

I think that's ready to merge @octonato

from kalix-jvm-sdk.

johanandren avatar johanandren commented on September 27, 2024

For the record: Inclusion of code-gen now has brought integration tests in the form of using the current state of codegen and maven plugin with the sample projects which then run integration tests against a dev mode proxy as part of PR validation etc.

from kalix-jvm-sdk.

patriknw avatar patriknw commented on September 27, 2024

I guess this has been done.

from kalix-jvm-sdk.

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.