Here follows a short documentation of the development setup for OS2KITOS 2.0.
OS2KITOS consists of two major parts. The backend WebAPI and OData API written in C# and .NET and an AngularJS 1.4.7 frontend written in TypeScript.
Dependencies for the frontend application is managed with the Node.js package manager npm
and the node module Bower. Bundling, linting and testing is handled with Gulp.
Before using the application install Node.js 4.x or above.
npm install -g bower gulp typings
This installs bower
, gulp
and typings
globally. This is not nessesary but assumed in the rest of the documentation.
npm install
Install Node.js modules. (Bower dependencies are installed through a postinstall script)
typings install
Install typings used by TypeScript
There are gulp
tasks to handle minification and concatination of all compiled TypeScript files and library dependencies. The main task is gulp deploy
. This task is automatically runs on build when using Visual Studio 2015 by means of the Task Runner Explorer.
What files to bundle is managed in bundle.config.js
.
The backend is a mix of .NET WebApi and OData controllers. Tests are written with xUnit with the NSubstitute substition framework.
Packages are managed with NuGET.
There are several .bat
scripts to run backend tests.
run-coverage.bat
runs all tests and creates an XML coverage reportrun-local-coverage.bat
runs all tests and create an HTML coverage report which is opened after testsrun-tests.bat
runs the xUnit tests. This is referenced in the other scripts
Note that these files must be updated with the right paths when there are version changes to OpenCover and ReportGenerator.
There is only a small amount of unit tests for the excisting backend. The goal is to rewrite all endpoints to OData controllers. The considerations of this change are not yet done, why no tests are written.
TeamCity