Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme #1

Merged
merged 5 commits into from
Feb 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ before_install:
- sudo apt-get install python3
- sudo apt-get install python3-pip
- sudo apt-get install python3-setuptools
- sudo pip3 install --upgrade setuptools
- sudo pip3 install bottleneck
# Pull Mongodb image to test
- docker pull mongo:latest
- docker run -d --net=host mongo:latest
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,13 @@ void test() {
}
```

When an amplification is successful, DSpot outputs the improvement on the console and the result of the amplification (the new tests) are written to the output folder specified by configuration property `outputDirectory` (default to `./target/dspot/output/`).
The modified test is lastly given to a selector, eg `--test-selector=PitMutantScoreSelector`, that determines if it improves the test suite and should be kept.

The amplification process is illustrated in the figure below. Note that amplified tests are further modified by subsequent iterations determined by for example `--iteration=10`.

![Application loop](docs/application_loop.png)

When an amplification is successful, DSpot outputs the improvement on the console and the result of the amplification (the new tests) are written to the output folder specified by configuration property `outputDirectory` (default to `./target/dspot/output/`).

```
Initial instruction coverage: 30 / 34
Expand All @@ -82,6 +87,8 @@ Amplified instruction coverage: 34 / 34
100.00%
```

Want to know more? Read the [full article] published in Springer Empirical Software Engineering (https://hal.inria.fr/hal-01923575/document) ([doi:10.1007/s10664-019-09692-y](https://doi.org/10.1007/s10664-019-09692-y))

### Command Line Usage

You can then execute DSpot by using:
Expand Down Expand Up @@ -360,7 +367,7 @@ However, **DSpot** provide different kind of `Amplifier`:
* `ReturnValueAmplifier`: creates objects based on the returned value by existing method call
* `None`: do nothing

#### Test Selectors (-s | --test-criterion)
#### Test Selectors (-s | --test-selector | --test-criterion)

In **DSpot**, test selectors can be seen as a fitness: it measures the quality of amplified, and keeps only amplified tests that are worthy according to this selector.

Expand Down
Binary file added docs/application_loop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions dspot-web/v2-mojo/README-developers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

# Development

## Directories

Projects being analysed by the DSpot Web UI are cloned and analysed in a dedicated directory, configured in section `work_dir` of the main configuration file of the application: `d_spot_web.conf`.

In this directory each directory is a project, with all required files and information for the project stored inside. A typical architecture looks as follows:

* `work_dir`
- `project_a`
- `src` is the git extract (clone) of the repository.
- `output` is the hierarchy generated during the dspot execution.
- `results.zip` is the compressed file of the results.
- `logs` contains the logs of all major actions:
- `dspot.log` is the log of the dspot execution.
- `git_clone.log` is the log of the `git clone` command.
- `git_pull.log` is the log of the last `git pull` command, if relevant.




qsfd
40 changes: 40 additions & 0 deletions dspot-web/v2-mojo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

# DSpot Web UI

## About

This directory contains everything needed to run a demonstration web server for DSpot.


## Installation

This application uses the [Mojolicious web framework](https://mojolicious.org/) and relies on a Postgres DB to store the task management system. Results are stored on disk.

You will need to install Perl and Mojolicious, plus a few other plugins. It is good practice to use [perlbrew](https://perlbrew.pl/) to manage one's perl installation, although it is not required. Then requirements can be installed with:

```
$ cpanm Mojolicious
$ cpanm Mojolicious::Plugin::Minion Mojolicious::Plugin::Minion::Admin Mojolicious::Plugin::Mail
$ cpanm Mojo::Pg
$ cpanm Archive::Zip File::Copy::Recursive DateTime
```

### Initialising the application

Setup a PostgreSQL DB for Minion:

```
postgres=# CREATE USER dspot_minion WITH PASSWORD 'pass4minion';
CREATE ROLE
postgres=# CREATE DATABASE dspot_minion OWNER dspot_minion;
CREATE DATABASE
```


## Run the application

```
$ hypnotoad script/dspot_web
```

The application is served on http://localhost:3000.
21 changes: 21 additions & 0 deletions dspot-web/v2-mojo/d_spot_web.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
'secrets' => ['abc7qzverq3rcqevq0d178qzabvftq96evfab563'],

# See README.md for Posgres configuration. Only used for job management.
'conf_pg_minion' => 'postgresql://dspot_minion:pass4minion@/dspot_minion',

# URL of the host (used for emails).
'hostname' => 'http://ci4.castalia.camp:3000',

# MAVEN_HOME.
'mvn_home' => '~/Applis/apache-maven-3.6.0/',

# Command to run when invoking mvn.
'mvn_cmd' => 'mvn clean install -DskipTests',

# Command to run when invoking dspot-maven.
'dspot_cmd' => 'mvn eu.stamp-project:dspot-maven:3.1.0:amplify-unit-tests -Doutput-path=../output/dspot/',

# Places where all repos will be cloned (and analysed).
'workspace' => '/data/dspot_workspace/',
}
Loading