Skip to content

Commit

Permalink
Merge branch 'develop' into enhancement/exam/review-page
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-glombik authored Sep 24, 2023
2 parents e4bf93d + 357768a commit 224388b
Show file tree
Hide file tree
Showing 309 changed files with 3,320 additions and 2,033 deletions.
9 changes: 0 additions & 9 deletions .ci/E2E-tests/execute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,3 @@ cd docker
docker compose -f $COMPOSE_FILE pull artemis-cypress $DB nginx
docker compose -f $COMPOSE_FILE build --build-arg WAR_FILE_STAGE=external_builder --no-cache --pull artemis-app
docker compose -f $COMPOSE_FILE up --exit-code-from artemis-cypress
exitCode=$?
cd ..
echo "Cypress container exit code: $exitCode"
if [ $exitCode -eq 0 ]
then
touch .successful
else
echo "Not creating success file because the tests failed"
fi
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ jobs:
uses: docker/setup-buildx-action@v3
# Build and Push to GitHub Container Registry
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
if: ${{ steps.compute-tag.outputs.result != 'FALSE' }}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push to GitHub Container Registry
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
if: ${{ steps.compute-tag.outputs.result != 'FALSE' }}
with:
# beware that the linux/arm64 build from the registry is using an amd64 compiled .war file as
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@
15. **[Learning analytics](https://ls1intum.github.io/Artemis/user/learning-analytics/)**: Artemis integrated different statistics for students to compare themselves to the course average. It allows instructors to evaluate the average student performance based on exercises and competencies.
16. **[Adaptive Learning](https://ls1intum.github.io/Artemis/user/adaptive-learning/)**: Artemis allows instructors and students to define and track competencies. Students can monitor their progress towards these goals, while instructors can provide tailored feedback. This approach integrates lectures and exercises under overarching learning objectives.
17. **[Tutorial Groups](https://ls1intum.github.io/Artemis/user/tutorialgroups/)**: Artemis support the management of tutorial groups of a course. This includes planning the sessions, assigning responsible tutors, registering students and tracking the attendance.
18. **[Scalable](https://ls1intum.github.io/Artemis/user/scaling/)**: Artemis scales to multiple courses with thousands of students. In fact, the largest course had 2,400 students. Administrators can easily scale Artemis with additional build agents in the continuous integration environment.
19. **[High user satisfaction](https://ls1intum.github.io/Artemis/user/user-experience/)**: Artemis is easy to use, provides guided tutorials. Developers focus on usability, user experience, and performance.
20. **Customizable**: It supports multiple instructors, editors, and tutors per course and allows instructors to customize many course settings
21. **[Open-source](https://ls1intum.github.io/Artemis/dev/open-source/)**: Free to use with a large community and many active maintainers.
18. **[Iris](https://artemis.cit.tum.de/about-iris)**: Artemis integrates Iris, a chatbot that supports students and instructors with common questions and tasks.
19. **[Scalable](https://ls1intum.github.io/Artemis/user/scaling/)**: Artemis scales to multiple courses with thousands of students. In fact, the largest course had 2,400 students. Administrators can easily scale Artemis with additional build agents in the continuous integration environment.
20. **[High user satisfaction](https://ls1intum.github.io/Artemis/user/user-experience/)**: Artemis is easy to use, provides guided tutorials. Developers focus on usability, user experience, and performance.
21. **Customizable**: It supports multiple instructors, editors, and tutors per course and allows instructors to customize many course settings
22. **[Open-source](https://ls1intum.github.io/Artemis/dev/open-source/)**: Free to use with a large community and many active maintainers.

## Roadmap

Expand Down
11 changes: 10 additions & 1 deletion docker/atlassian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
image: ghcr.io/ls1intum/artemis-jira:9.4.3
pull_policy: always
volumes:
- artemis-jira-data:/var/atlassian/application-data/jira
- artemis-jira-data:/var/atlassian/application-data/jira
ports:
- "8081:8080"
# expose the port to make it reachable docker internally even if the external port mapping changes
Expand Down Expand Up @@ -57,6 +57,12 @@ services:
- "8085"
networks:
- artemis
healthcheck:
test: curl -f http://localhost:8085/rest/api/latest/server | grep "<state>RUNNING</state>"
interval: 10s
timeout: 5s
start_period: 40s
retries: 120 # = 20 minutes startup time during setup

bamboo-build-agent:
container_name: artemis-bamboo-build-agent
Expand All @@ -74,6 +80,9 @@ services:
BAMBOO_SERVER: "http://bamboo:8085"
networks:
- artemis
depends_on:
bamboo:
condition: service_healthy

networks:
artemis:
Expand Down
2 changes: 2 additions & 0 deletions docs/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ build:
os: ubuntu-22.04
tools:
python: "3.10"
sphinx:
fail_on_warning: true
python:
install:
- requirements: docs/requirements.txt
3 changes: 2 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
# -W: treat warnings as errors
SPHINXOPTS ?= -W
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/pyris-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ E.g.: ``cp Pyris/application.example.yml application.yml``

Now you need to configure the ``application.yml`` file. Here is an example configuration:

.. code-block:: yml
.. code-block:: yaml
pyris:
api_keys:
Expand Down
47 changes: 24 additions & 23 deletions docs/dev/cypress.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Follow these steps to create your local cypress instance:

2. Customize Cypress settings

To connect cypress to our local Artemis instance, we need to adjust some configurations.
To connect cypress to our local Artemis instance, we need to adjust some configurations.
First we need to set the URL or IP of the Artemis instance in the ``cypress.config.ts`` file.
Adjust the ``baseUrl`` setting to fit your setup (e.g. ``baseUrl: 'http://localhost:9000',``)

Expand All @@ -39,7 +39,7 @@ Follow these steps to create your local cypress instance:
We also need to adjust the user setting, which will determine the usernames and passwords, that cypress
will use. These settings are located within the ``cypress.env.json`` file. If you use the Atlassian setup,
the file should typically look like this:

.. code-block:: json
{
Expand All @@ -54,8 +54,9 @@ Follow these steps to create your local cypress instance:
"instructorGroupName": "instructors"
}
The ``USERID`` part will be automatically replaced by different user ids. These are set within the ``support/users.ts`` file.
The ``USERID`` part will be automatically replaced by different user ids. These are set within the ``support/users.ts`` file.
For a typical local installation the IDs are:

- studentOne: 1
- studentTwo: 2
- studentThree: 3
Expand Down Expand Up @@ -87,7 +88,7 @@ Follow these steps to create your local cypress instance:
:align: center
:alt: Cypress cypress-open-screenshot

You can now click on any test suite and it should run.
You can now click on any test suite and it should run.

.. warning::
**IMPORTANT**: If you run the E2E tests for the first time, always run the ``ImportUsers.ts`` tests first,
Expand All @@ -97,18 +98,18 @@ Follow these steps to create your local cypress instance:
Debug using Sorry Cypress
-------------------------

Since the E2E tests are sometimes hard to debug, we provide a dashboard, that allows to inspect the
CI run and even watch a video of the UI interaction with Artemis in that run.
Since the E2E tests are sometimes hard to debug, we provide a dashboard, that allows to inspect the
CI run and even watch a video of the UI interaction with Artemis in that run.

It's based on Sorry Cypress a open source and selfhostable alternative to the paid cypress cloud.

The dashboard itself can be access here: https://sorry-cypress.ase.cit.tum.de/

To access it, you need these basic auth credentials (sorry cypress itself does not provide an auth
To access it, you need these basic auth credentials (sorry cypress itself does not provide an auth
system, so we are forced to use nginx basic auth here). You can find these credentials on our confluence page:
https://confluence.ase.in.tum.de/display/ArTEMiS/Sorry+Cypress+Dashboard

After that you will see the initial dashboard.
After that you will see the initial dashboard.

You first have to select a project in the left sidebar (mysql or postgresql):

Expand All @@ -122,44 +123,44 @@ Now you get a list of the last runs. In the top right you can enter your branch
:align: center
:alt: Sorry Cypress last runs

The name of the run consists of the branch name followed by the run number. The last part is MySQL or
PostgreSQL depending on the run environment. If you are in the MySQL project, you will of course only see the MySQL runs.
The name of the run consists of the branch name followed by the run number. The last part is MySQL or
PostgreSQL depending on the run environment. If you are in the MySQL project, you will of course only see the MySQL runs.

If you now click on the run, you can see detailed information about the test suites (corresponding
If you now click on the run, you can see detailed information about the test suites (corresponding
to components within Artemis). For each suite there is information about the run time, the successful/failed/flaky/skipped/ignored tests:

.. figure:: cypress/sorry-cypress-run.png
:align: center
:alt: Sorry Cypress single run

If you want to further debug one test suite, just click on it.
If you want to further debug one test suite, just click on it.

.. figure:: cypress/sorry-cypress-test.png
:align: center
:alt: Sorry Cypress single test

Here you can see the single tests on the left and a video on the right. This is a screen capture of
the actual run and can tremendously help debug failing E2E tests.
Here you can see the single tests on the left and a video on the right. This is a screen capture of
the actual run and can tremendously help debug failing E2E tests.

Sometimes the video can be a little bit to fast to debug easily. Just download the video on your
computer and play it with a video player, that allows you to slow the video down.
Sometimes the video can be a little bit to fast to debug easily. Just download the video on your
computer and play it with a video player, that allows you to slow the video down.

.. note::
For maintenance reasons videos are deleted after 14 days. So if you have a failing test, debug
it before this period to get access to the video.
For maintenance reasons videos are deleted after 14 days. So if you have a failing test, debug
it before this period to get access to the video.


Best practice when writing new E2E tests
----------------------------------------

**Understanding the System and Requirements**

Before writing tests, a deep understanding of the system and its requirements is crucial.
This understanding guides determining what needs testing and what defines a successful test.
Before writing tests, a deep understanding of the system and its requirements is crucial.
This understanding guides determining what needs testing and what defines a successful test.
The best way to understand is to consolidate the original system`s developer or a person actively working on this
component.

**Identify Main Test Scenarios**
**Identify Main Test Scenarios**

Identify what are the main ways the component is supposed to be used. Try
the action with all involved user roles and test as many different inputs as
Expand Down Expand Up @@ -209,12 +210,12 @@ and fx the issue, or update the test if the requirements have changed.

**Regularly Review and Refactor Your Tests**

Tests, like code, can accumulate technical debt. Regular reviews for duplication,
Tests, like code, can accumulate technical debt. Regular reviews for duplication,
unnecessary complexity, and other issues help maintain tests and enhance reliability.

**Use HTML IDs instead of classes or other attributes**

When searching for a single element within the DOM of an HTML page, try to use ID selectors as much as possible.
When searching for a single element within the DOM of an HTML page, try to use ID selectors as much as possible.
They are more reliable since there can only be one element with this ID on one single page according to the HTML


Expand Down
3 changes: 2 additions & 1 deletion docs/dev/development-process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ Naming Conventions for GitHub Pull Requests
1. The first term is a main feature of Artemis and is using code highlighting, e.g. “``Programming exercises``:”.

1. Possible feature tags are: ``Programming exercises``, ``Quiz exercises``, ``Modeling exercises``, ``Text exercises``, ``File upload exercises``, ``Exam mode``,
``Grading``, ``Assessment``, ``Communication``, ``Notifications``, ``Team exercises``, ``Lectures``, ``Plagiarism checks``, ``Learning analytics``, ``Adaptive learning``, ``Tutorial groups``.
``Grading``, ``Assessment``, ``Communication``, ``Notifications``, ``Team exercises``, ``Lectures``, ``Plagiarism checks``, ``Learning analytics``,
``Adaptive learning``, ``Tutorial groups``, ``Iris``.
2. If the change is not visible to end users, or it is a pure development or test improvement, we use the term “``Development``:”.
3. Everything else belongs to the ``General`` category.

Expand Down
4 changes: 2 additions & 2 deletions docs/dev/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ HTTP. We need to extend the configuration in the file
------------------------------------------------------------------------------------------------------------------------

Iris/Pyris Service
--------------
------------------

Iris is an intelligent virtual tutor integrated into the Artemis platform.
It is designed to provide one-on-one programming assistance without human tutors.
Expand All @@ -726,7 +726,7 @@ Prerequisites
- Set up a running instance of Pyris_. Refer to the :doc:`../admin/pyris-setup` for more information.

Enable the ``iris`` Spring profile:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

Expand Down
4 changes: 2 additions & 2 deletions docs/dev/setup/bamboo-bitbucket-jira.rst
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ Configure Artemis
server:
port: 8080 # The port of artemis
url: http://172.20.0.1:8080 # needs to be an ip
// url: http://docker.for.mac.host.internal:8080 # If the above one does not work for mac try this one
// url: http://host.docker.internal:8080 # If the above one does not work for windows try this one
# url: http://docker.for.mac.host.internal:8080 # If the above one does not work for mac try this one
# url: http://host.docker.internal:8080 # If the above one does not work for windows try this one
In addition, you have to start Artemis with the profiles ``bamboo``,
``bitbucket`` and ``jira`` so that the correct adapters will be used,
Expand Down
Loading

0 comments on commit 224388b

Please sign in to comment.