tomasnorre / exercism-php-test-runner

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jest Tests Smoke Test Tooling image pushed

PHP Test Runner

This is a minimal test runner for Exercism's v3 platform. It meets the minimal spec for testing practice exercises. It does not currently parse the test case code being run, therefore it does not meet the standard for testing concept exercises.

Basic components

Dockerimage

The website uses isolated docker images to run untrusted code in a sandbox. Image consists of PHP 8.2.7 (PHPUnit 9/10). All final assets are built into the image, because the image does not have network access once in use.

Includes php extensions: ds, intl

Test runner

Test running a solution is coordinated by a bash script at bin/run.sh taking 3 positional arguments:

> bin/run.sh <test-slug> <directory path to solution> <directory path for output>

JUnit to JSON

PHPUnit can natively output tests run to junit xml format, but Exercism requires output in json format. A php-based app is located in the junit-handler folder. It provides a translation layer from one format to the other incorporating task_id identification and test code inclusion.

About

License:GNU Affero General Public License v3.0


Languages

Language:PHP 75.2%Language:Shell 20.1%Language:Dockerfile 4.7%