mumuki / mumuki-bibliotheca-api

:books: Storage and formatting API for Mumuki content
GNU Affero General Public License v3.0
4 stars 0 forks source link

Simple test should be easier to code #134

Open flbulgarelli opened 6 years ago

flbulgarelli commented 6 years ago

In order to allow more people to write their own exercises, providing a simpler interface for entering a test is essential.

Nowadays, the content writer must have a deep understanding of the language, test framework and/or runner details in order to write their own tests.

We should be able to enter simple tests as fixture-tables, using a clean an simple UI. It should translate to a simple, generic, cross-language spec of a test, like the following:

Testing a function

subject:  succ
examples: 
- arguments: 
   - 1
 return: 2
- arguments: 
   - 4
 return: 5

Testing a procedure that performs I/O

subject:  echo
examples: 
- input: helllo
  output: hello
- input: world 
  output: world

Testing a program that performs I/O

examples: 
- input: helllo
  output: hello
- input: world 
  output: world

Others

We should still define how we want to declare testing of subroutines that perfom some kind of modification of a global matricial state, like in gobstones, SQL or QSIM.

See https://github.com/flbulgarelli/tester

flbulgarelli commented 6 years ago

Related to https://github.com/mumuki/mumuki-bibliotheca/issues/167