1

I have a trouble with running test cases with Java language in Codeship. Without writing setup and test commands, it gives wrong execution results and there is not any explanation about how to write and execute test cases in Java. Also, it is connected with GitHub and gets project codes from there. Where I can write and how I can run my test cases in codeship?

Jens Piegsa
  • 7,399
  • 5
  • 58
  • 106
B.Rob
  • 77
  • 1
  • 2
  • Have you searched for Codeship tutorials? I found a few with a quick Google search – CubeJockey Dec 09 '15 at 21:21
  • Yes, I searched them but they are generally about Ruby. If you found some examples, can you share their links? – B.Rob Dec 09 '15 at 21:34
  • I don't know anything about Codeship or what it is, but I've found their Java documentation: https://codeship.com/documentation/languages/java-and-jvm-based-languages/ and a page about using Java 7 or 8 : https://blog.codeship.com/java-continuous-delivery-codeship/ – CubeJockey Dec 09 '15 at 21:36
  • Actually I don't know much about codeship but it is necessary for my assignment. These are what I've already found and I think they are not very useful for testing java code. Thanks anyway. – B.Rob Dec 09 '15 at 21:46

1 Answers1

0

Obviously the links provided by @CubeJockey contains the necessary information (see step 5 below). I therefore assume that some prerequisites or the knowledge of basic concepts are missing here. A possible workflow may look like this:

  1. Create a Maven project

  2. Write some unit tests, put them into /src/test/java

  3. Run your tests locally with Maven

  4. Push your code to a remote Git repository like GitHub or Bitbucket

  5. Setup Codeship for continuous integration:

    Setup Commands

    jdk_switcher use oraclejdk8
    

    Configure Test Pipelines / Test Commands

    mvn -B test
    
  6. Trigger the Codeship build, either manually or via another push to the git repo

Jens Piegsa
  • 7,399
  • 5
  • 58
  • 106