usage.md 2.24 KB
Newer Older
Lukas Wiest's avatar
Lukas Wiest committed
1
2
# Usage

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
On this page you'll find all information regarding the usage of Dockerized Testing Toolkit for lecturers as-well as students.

## Lecturer

### Requirements

- testrunner docker-image hosted on DockerHub. Either:
    1. choose from the official supported list
    2. find/create custom image
- tests code base in internet accessible Git-Repo
- file-structure of code-base to match choosen runner's specifications

### Create/Edit Assignment in Moodle

In your Moodle course

- add a new Assignment
- enable Dockerized Testing Toolkit
- disable all other submission types
- upload textfile with your assignment settings (see below on file specification)

To edit an existing assignment, just remove the old and upload a new config file.
## Student

As student you can either zip your submission, or upload a textfile with the link to your git repository.
For the file specifications see below.
## DTT configuration file specification

This section describes how the DTT-config-files work.

They have to contain an URI starting with `dtt` as identifier, then followed by the information as shown below.
### Lecturer (assignment)

Information needed in the config-file:

- url to git repo
- user and password, if needed for access
- docker image to use

```
dtt::<git-repo-url>::<none|<user name>>::<none|<user name>>::<docker image[:tag]>
```

Example:

```
# test code
dtt::https://transfer.hft-stuttgart.de/gitlab/dtt/example_openjdk11-junit5-calculator-test.git::none::none::hftstuttgart/dtt-openjdk11-junit5-testrunner:feat-dtt-transition
```

### Student (submission)

Information needed in the config-file:

- url to git repo
- user and password, if needed for access  

```
dtt::<git-repo-url>::<none|<user name>>::<none|<user name>>
```

!!! tip
    Additionally any number of [Unified-Ticketing][1] URIs can be in the config file for ticket response.

Example:

```
# source code
dtt::https://transfer.hft-stuttgart.de/gitlab/dtt/example_openjdk11-junit5-calculator-submission.git::none::none

# disabled, just as example
# ticket response
# unifiedticketing:gitlab:https://transfer.hft-stuttgart.de/gitlab:0815:ABASAEUIBFI44BKW34U7I24
```

<!-- Unified-Ticketing -->
[1]: https://transfer.hft-stuttgart.de/pages/9lukas5/unified-ticketing/api/core/ticket-system.html#by-uri