Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Latest commit

 

History

History
128 lines (96 loc) · 4.49 KB

README.adoc

File metadata and controls

128 lines (96 loc) · 4.49 KB

GAD 2022 - Tests

This is a repository to collect JUnit Tests for GAD exercises at TUM in SS22. These tests have been written by students for students and are not part of the official course.

Es ist alles erlaubt, was die Lösung nicht verrät.

The so-called Übungsleitung will have an eye on this repository. But as long as the tests do not reveal the solution of the homework, this repository will tolerate them. To ensure the solution is not getting revealed, the tests should be Input/Output-Tests only.

Furthermore, there is no guarantee of the correctness of the tests. Neither the Übungsleitung nor any of the other tutors will contribute own tests. We (Maximilian Anzinger, Johannes Stöhr, Georg Henning, Oliver Specht) will just make shure that there are no tests that reveal the solution. It is your own responsibility to validate the correctness and if necessary report bugs or even provide/contribute a fix for your fellow student.

Examples

correct:

// Test Area calculation
// Arrange
Rectangle r1 = new Rectangle(length: 4, width: 4)
// Act & Assert
assertEquals(16, r1.calculateArea());

wrong!:

// Test Area calculation
// Arrange
Rectangle r1 = new Rectangle(length: 4, width: 6)
// Act & Assert
// Calculate using length * width             // <-- reveales the solution
assertEquals(4*6, r1.calculateArea()); // <-- reveales the solution

2. Usage

  1. Clone this repository

    git clone https://github.com/MaximilianAnzinger/gad2022-tests.git
  2. Check for updates

    git pull
  3. Add the test folder to your src-folder of your artemis java project

    Or use the syslink instruction below.

  4. Make sure your IDE (e.g. IntelIJ or Eclipse) sees your added files

  5. Include JUnit to your Project by pressing the red lightbulb (or ALT + ENTER in IntelIJ) on one of the red underlined @Test Annotations in the test file.

  6. Do not add them to your artemis git repository

  7. Run the tests and check your mistakes

Important note

As this is a student-driven project please keep in mind that mistakes can happen. If you think a test is wrong, please feel free to open an Issue (it is easy!). To help fixing bugs, please add the following info to your Issue:

  • Operating system

  • IDE (IntelIJ, Eclipse, …​)

  • Where is the mistake / error

  • Citation of the homework instruction

How to use symlinks (Advanced Users only!)

Windows:

This has to be executed in the command line, run as administrator:

$ mklink /d \path\to\src\tests \path\to\repository\tests

Linux/MacOS:

$ ln -s /path/to/repository/tests /path/to/src/

3. How to Contribute

  1. Fork Repository (Github Documentation)

  2. Add / edit tests under <EXERCISE>/src/test`

  3. Ensure no solution or homework-code is getting revealed

  4. Commit and push to your fork repository

  5. Open a Pull Request to this repository (Github Documentation)

  6. Wait until the changes are merged

4. Contributors

Contributors
  1. Tests SS17, SS21 (not necessarily working for this semester, but for sure a great starting point)

  2. Write Tests using JUnit 5

  3. How to use Git

  4. How to use Github

6. Contact

Feel free to contact us (Maximilian Anzinger, Johannes Stöhr, Georg Henning, Oliver Specht) via Zulip, but consider using google beforehand.

Under no circumstances contact the Übungsleitung regarding any problems that may occur while using these tests or contributing to this repository. '+