You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ A multi-language offline batch test runner for `CodinGame` (or other) solo I/O p
8
8
9
9
__CGTest__ is a simple command-line tool to run tests in batch mode using your local dev and runtime environments. With a single command, you can run hundreds of tests for your code, even if written in __multiple languages__, for __multiple puzzles__ (or projects), and for __multiple test cases__ per puzzle.
10
10
11
-
CGTest was successfully used for running `c`, `c#`, `c++`, `d`, `dart`, `f#`, `fortran`, `go`, `groovy`, `haskell`, `java`, `kotlin`, `lua`, `pascal`, `perl`, `php`, `python`, `ruby`, `rust`and `scala` tests both in Windows and in Linux; and additionally `bash` and `ocaml` in Linux. It should also work on almost any other computer system, including Mac.
11
+
CGTest was successfully used for running `c`, `c#`, `c++`, `d`, `dart`, `f#`, `fortran`, `go`, `groovy`, `haskell`, `java`, `kotlin`, `lua`, `pascal`, `perl`, `php`, `python`, `ruby`, `rust`, `scala`and `vb.net` tests both in Windows and in Linux, and additionally `bash` and `ocaml` in Linux. It should also work on almost any other computer system, including Mac.
12
12
13
13
The test runner works for any non-interactive code that reads from a standard input stream, and writes the result to the standard output stream. Using it for CodinGame puzzles is only one possible use case.
14
14
@@ -103,7 +103,7 @@ Some settings (but not all) can be also overriden via command-line arguments. If
103
103
* By default, all source code is expected to be in the respective `languageName/` directory, with the same name as the beginning of the test case input data file name.
104
104
* If using _per-puzzle_ directories for the test cases, you must set the per-language `'sourcePath'` setting to `''` in the config file.)
105
105
* If not provided via command-line, list the puzzle names in the config file either in the global `'puzzles'` section, or in a per-language `'includePuzzles'` list. If you have solution for a puzzle in most (but not all) languages, you can list it in the global puzzles section, but add also add to the per-language `'excludePuzzles'` lists for languages that you lack the solution.
106
-
* You can also add a puzzle to a per-language `'runOnlyPuzzles'` list in the config file. These puzzles will be built and run, but the tests will always pass, without evaluating the test results.
106
+
* You can also add a puzzle to a per-language `'runOnlyPuzzles'` list in the config file. These puzzles will be built and run, but the tests will always pass, without evaluating the test results. This is useful to run some _optimization_ and _multi-turn_ puzzles on CodinGame.
107
107
* You can change the directory structure and the file naming conventions that `CGTest` is using out of the box. However, you will need to tweak the config file a bit to your liking. For more details, check out the comments in the sample config file.
108
108
109
109
### Important
@@ -125,21 +125,24 @@ ___SPOILER ALERT:___ In the repository, there are solution source code files in
125
125
* This has references to ALL the test cases included in the CGTest repository.
126
126
* Some puzzles are listed in the global `'puzzles'` section. These are the shortest and simplest puzzles, so they are especially well-suited if you want to solve some puzzles in __all the CG-supported languages__.
127
127
* Other puzzles are listed in a per-language `'includePuzzles'` or `'runOnlyPuzzles'` section. Modify the language and comment out the puzzle names as needed.
128
-
* For most puzzles currently only a single test case is provided. That is OK for a simple smoke-test, but not to prove that your solution is correct.
128
+
* For most puzzles, currently only a single test case is provided. That is OK for a simple smoke-test, but not enough to prove that your solution is really correct.
129
129
130
130
## Restrictions
131
131
132
132
*_CGTest_ supports only solo I/O puzzles. For any test case, the input must be a fixed file (so a given line of input cannot depend on the output previously provided by the code). This means that some solo and optim puzzles cannot be tested. Bot programming is also out of question.
133
+
* The `run-only` configuration can be used to run these puzzles based on _turn #0_ input data, however your code must be modified for offline use to avoid running out of input.
133
134
134
135
* CGTest is a single thread application, so tests are running in sequence, which can be rather slow if you have lots of test cases. If you start CGTest multiple times concurrently, use separate configuration files, with different output directory settings.
135
136
136
137
* CGTest does not use containers or any other environment separation when running your tests. If your code does silly things, like deleting files, then CGTest will NOT prevent it doing the damage.
137
138
139
+
* Building `C#` or `VB.NET` source code generates lots of files in the `.tests/temp/bin` and `.tests/temp/obj` directories. CGTest does not delete these directories with the `--clean` command-line option.
140
+
138
141
## Known issues
139
142
140
143
I don't have local dev environment for all the 27 languages Codingame supports. Therefore, some of the languages default settings are not properly set up. You need to create a section for these languages in the config file.
141
144
142
-
* I could not yet set up to run the tester properly for: `vb.net`, `clojure`, `objective-c`, `swift`
145
+
* I could not yet set up to run the tester properly for: `clojure`, `objective-c`, `swift`
143
146
*`javascript` and `typescript` code is run by `node`, however the `readline()` function is missing. I don't know how to properly polyfill this locally.
144
147
* Running `bash` script works in WSL or in Linux, but I ran into issues with vanilla Windows using a _'bash for Windows'_ package such as `MSYS2`.
0 commit comments