Skip to content

Improve output files #601

@niknetniko

Description

@niknetniko

Again, split into files themselves and the "text" based output channels.

files

In TESTed, you were only able to provide a single output file using file. This has been extended to support multiple.

An output_file contains both a path and a content field, both of which are required.

  • The path field specifies the path to the file that the student should have generated (in the working directory).
  • The content field contains either the expected contents of the generated file or a path to a real file containing the expected contents (located in the evaluation folder).
tabs:
- tab: output_file
  contexts:
  - testcases:
    - expression: genereer('origineel_tekst.txt', 'text', 3)
      return: true
      output_files:
        - content: !path "files_tests/tekst1.txt"
          path: "text1.txt"
        - content: !path "files_tests/tekst2.txt"
          path: "text2.txt"
        - content: "Created using write mode.\n3\n"
          path: "text3.txt"
      input_files:
        - path: "origineel_tekst.txt"
          content: "Created using write mode.\n"

At the moment, these are all shown inline on Dodona.

See also #482

stdout and stderr

The same support is also added here, except path is not supported. (here this is basically a rename of data to content)

- tab: stdout
  contexts:
  - testcases:
      - stdin: "hello"
        stdout: 
          content: "hello world!\n"

In the future, we might also support path to generate things like submisson > stdout.txt if we have some use for that, but at the moment this is not supported.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions