Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

how can i run this in intellij using a unit test #37

Open
ankitanuj30 opened this issue May 13, 2022 · 3 comments
Open

how can i run this in intellij using a unit test #37

ankitanuj30 opened this issue May 13, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@ankitanuj30
Copy link

i wanted to run this code in intellij using a unit test case.
but it require some commandline arguments
can you please provide the command line arguments to run this in proper format

@ankitanuj30 ankitanuj30 added the bug Something isn't working label May 13, 2022
@toronik
Copy link

toronik commented May 16, 2022

Hi @ankitanuj30 , could you please elaborate on what you are trying to run?
Run the docker image in tests? Run the springboot service in tests? Run some specific classes in tests?

To run springboot service you can:

  1. comment the line https://github.com/Adven27/grpc-wiremock/blob/master/build.gradle#L41
  2. uncomment the following block https://github.com/Adven27/grpc-wiremock/blob/master/build.gradle#L42
  3. run gradle bootRun or start springboot service from test programmatically.

@ankitanuj30
Copy link
Author

ankitanuj30 commented May 16, 2022

hi @toronik ,
i want to run a unit test case using command line args,
and i dont know know what command line args i need to pass for running the unit test case using spring boot service
I am just trying to run and debug the main function of GrpcWireMock.java class in which some commands line args need to be passed, just help me with this

@toronik
Copy link

toronik commented May 20, 2022

@ankitanuj30 did you try to pass none?
This should work:

    @Test
    void test() {
        GrpcWiremock.main(new String[] {});
    }

or you can pass application properties:

    @Test
    void test() {
        GrpcWiremock.main(new String[] {"--grpc.server.port=3000"});
    }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants