Giter Club home page Giter Club logo

utu-thesis-prototype's Introduction

Automated Assessment System for Web Programming Assignments

This system is a prototype that aims to support in web programming student assignment assessment. The prototype has been developed using a course arranged by the university of Turku, DTEK2040: Web And Mobile Programming, as a case study.

The goal of this system is to take student submissions as initial input and then run them through sets of automated tests to assert whether relevant assignment dictated requirements are fulfilled. Implemented robotic process automation tasks are performed to complete various file manipulation and submission preparament, record keeping and summary formulation processes.

System has been built using Bash, Robot Framework and Python.

Shield: CC BY 4.0

This work is licensed under a Creative Commons Attribution 4.0 International License.

CC BY 4.0

Contents

1) Install: How the setup was done during development

2) Use: How the prototype was used while testing

3) Packages and high level descriptions: What package versions were used to test


1) Install

Installation foreword

Prototype has been tested with

  1. Debian 11 (bullseye)
  2. Docker container running on base image python:3-slim-bullseye

Installation instructions will cover the first one and briefly note the second one. Knowledge of basic OS usage is expected.


Install on Debian

First Python related steps can be skipped if Python3 version >3.9 already installed. The prototype was developed with Python 3.9.2. No guarantees for future versions. Version can be checked with:

python3 --version

Otherwise the steps cover how to install all the required packages for the automation tests to work as they should. Dockerfile contents can also be used to execute all the installation commands included in the RUN section (mind the mkdirs and permission mods; these can be skipped). In this case also chrome and chromedriver will be installed.

1) Python dependencies:

sudo apt install wget build-essential libreadline-gplv2-dev libncursesw5-dev \
libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev

2) Python:

Download the latest / wanted Python release:

wget https://www.python.org/ftp/python/3.9.2/Python-3.9.2.tgz

Extract and navigate to python dir:

tar xzf Python-3.9.1.tgz && cd Python-3.9.2

Prepare python source code compilation:

/configure --enable-optimizations

Build:

make -j 2

Install binaries:

sudo make alt install

Python is now installed as an alternative install. Command to use is 'python' appended with the installed version, i.e.

python3.9 --version

3) Node, npm, create-rect-app and json-server: (see also: https://github.com/nodesource/distributions/blob/master/README.md)

curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& npm install npm@latest -g \
&& npm install -g create-react-app \
&& npm install -g json-server

4) netcat:

Netcat:

apt-get install -y netcat

5) Robot Framework + libraries, Beautiful Soup, parsers:

Robot Framework (+ browser library, requests library, excel library) and Beautiful Soup (+ html5lib & lxml parsers) are installed using the pip commands inside requirements.txt file.

Inside the prototype root dir, execute command:

pip3 install -r ./requirements.txt

Initialize browser library:

rfbrowser init

6) Mongo database: (see also: https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-debian/)

Import public key and create list file:

wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | apt-key add - \
&& echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/6.0 main" \
| tee /etc/apt/sources.list.d/mongodb-org-6.0.list

Reload package database and install Mongo db packages:

&& apt-get update \
&& apt-get install -y mongodb-org

Directories for Mongo db data and log files should be created during the installation. However, if Mongo does not seem to launch at all, consult instructions from the link mentioned at the start of this step.


Install on Docker

The root directory contains Dockerfile which can be used to build a docker image. Consult Docker documentation on how to use Docker. (For example: https://docs.docker.com/get-started/02_our_app/)


2) Use

Set up before running the pipeline

Directories for separate exercises are found in ./data/submissions/ directory. Before executing the pipeline, to-be-assessed submissions should be inside their respective exercise folder packaged in zip format.


Executing the pipeline on a local system

Pipeline is started by executing the run_pipeline.sh script located inside ./pipeline_scripts/orchestrating/ directory.

The exercise set to assess is declared with parameter ex0 / ex1 / ex2 / ex3, i.e. when executed from root directory:

./pipeline_scripts/orchestrating/run_pipeline.sh ex3

Executing the pipeline on Docker

The entrypoint inside Dockerfile needs to be used and the wanted exercise option declared. By default the entrypoint has been commented out, in which case the container needs to be accessed manually to run the pipeline as one would do locally.


Executing the pipeline on GitLab CI

Root directory contains gitlab-ci.yml file which sets up a two stage CI pipeline in GitLab if the prototype is pushed as a repo. The ci-file contains variable ASSESSMENT_COVERAGE which is used to define the exercise set that should be assessed during pipeline execution.

When executed inside the CI, Dockerfile should have the entrypoint line commented out or removed because the ci-file will be responsible for running the script.

Results for the execution are uploaded as artifacts and can be downloaded once run is complete. Make sure to set the CI execution timelimit high enough from GitLab settings, depending on submission batch size to assess.


3) Packages and high level descriptions

Prototype has been tested with the following package versions

Name Version
Node.js 18.7.0
Npm 8.18.0
create-react-app 5.0.1
json-server 0.17.0
MongoDB 6.0.1
netcat 1.217-3
lxml 4.9.1
html5lib 1.1
Beautiful Soup 4.11.1
Robot Framework 5.0.1
Browser library 14.1.0
Requests library 0.9.3

Architecture overview

image-1.png


Script logical layering

image-2.png

utu-thesis-prototype's People

Contributors

tomisalomaa avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.