Git Product home page Git Product logo

cobol-test-runner's Introduction

Exercism Test Runner Template

This repository is a template repository for creating test runners for Exercism tracks.

Using the Test Runner Template

  1. Ensure that your track has not already implemented a test runner. If there is, there will be a https://github.com/exercism/<track>-test-runner repository (i.e. if your track's slug is python, the test runner repo would be https://github.com/exercism/python-test-runner)
  2. Follow GitHub's documentation for creating a repository from a template repository
    • Name your new repository based on your language track's slug (i.e. if your track is for Python, your test runner repo name is python-test-runner)
  3. Remove this Exercism Test Runner Template section from the README.md file
  4. Build the test runner, conforming to the Test Runner interface specification.
    • Update the files to match your track's needs. At the very least, you'll need to update bin/run.sh, Dockerfile and the test solutions in the tests directory
    • Tip: look for TODO: comments to point you towards code that need updating
    • Tip: look for OPTIONAL: comments to point you towards code that could be useful

Once you're happy with your test runner, open an issue on the exercism/exercism to request an official test runner repository for your track.

Exercism TRACK_NAME_HERE Test Runner

The Docker image to automatically run tests on TRACK_NAME_HERE solutions submitted to Exercism.

Run the test runner

To run the tests of an arbitrary exercise, do the following:

  1. Open a terminal in the project's root
  2. Run ./bin/run.sh <exercise-slug> <solution-dir> <output-dir>

Once the test runner has finished, its results will be written to <output-dir>/results.json.

Run the test runner on an exercise using Docker

This script is provided for testing purposes, as it mimics how test runners run in Exercism's production environment.

To run the tests of an arbitrary exercise using the Docker image, do the following:

  1. Open a terminal in the project's root
  2. Run ./bin/run-in-docker.sh <exercise-slug> <solution-dir> <output-dir>

Once the test runner has finished, its results will be written to <output-dir>/results.json.

Run the tests

To run the tests to verify the behavior of the test runner, do the following:

  1. Open a terminal in the project's root
  2. Run ./bin/run-tests.sh

These are golden tests that compare the results.json generated by running the current state of the code against the "known good" tests/<test-name>/results.json. All files created during the test run itself are discarded.

When you've made modifications to the code that will result in a new "golden" state, you'll need to generate and commit a new tests/<test-name>/results.json file.

Run the tests using Docker

This script is provided for testing purposes, as it mimics how test runners run in Exercism's production environment.

To run the tests to verify the behavior of the test runner using the Docker image, do the following:

  1. Open a terminal in the project's root
  2. Run ./bin/run-tests-in-docker.sh

These are golden tests that compare the results.json generated by running the current state of the code against the "known good" tests/<test-name>/results.json. All files created during the test run itself are discarded.

When you've made modifications to the code that will result in a new "golden" state, you'll need to generate and commit a new tests/<test-name>/results.json file.

cobol-test-runner's People

Contributors

0xe282b0 avatar axtens avatar dependabot[bot] avatar erikschierboom avatar exercism-bot avatar ihid avatar ktsnowy avatar kytrinyx avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cobol-test-runner's Issues

Test runner fails with OOM

Hi @ErikSchierboom,

I changed the logging so that in case no test.cob file is created, we see the complete log output.
It looks like cobolcheck is running out of memory. I never checked how much memory is consumed. The program is a Java app, which is built with GraalVM native image to a binary.

How much memory is allowed to consume?

Found cobolcheck, using ./bin/cobolcheck
Fatal error: unhandled exception in isolate 0x7f9775c00000: java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
    at com.oracle.svm.core.thread.PlatformThreads.startThread(PlatformThreads.java:674)
    at java.lang.Thread.start0(Thread.java:343)
    at java.lang.Thread.start(Thread.java:802)
    at com.oracle.svm.core.heap.ReferenceHandlerThread.start(ReferenceHandlerThread.java:54)
    at com.oracle.svm.core.graal.snippets.CEntryPointSnippets.initializeIsolate(CEntryPointSnippets.java:286)
    at com.oracle.svm.core.JavaMainWrapper$EnterCreateIsolateWithCArgumentsPrologue.enter(JavaMainWrapper.java:278)

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.