bptlab / scylla

Extensible BPMN process simulator
MIT License
19 stars 9 forks source link

Add testing capabilities and travis support #10

Closed marcfreiheit closed 6 years ago

marcfreiheit commented 6 years ago

Description

Testing

This PR introduces the testing framework junit and configured Travis support. All tests can be found in src/test/java/de/hpi/bpt/scylla/ and must have the Tests postfix. The postfix is mandatory, otherwise tests which lack this postfix will be skipped.

Local Maven Repository

In addition, I've added a local maven repo to manage all plugins. You can find the repo in src/main/resources/scylla-repository/. I've included StatsLogging and InterfaceTesting already. Doing that, you don't have to include the jars manually. You can just pull the code and go ahead.

Refactored main method of Scylla

I've refactored the main class in order that it's testable. You can now pass parameters to the main method using the following schema:

Usage: Scylla --config=<your config file> --bpmn=<your first bpmn file> [--bpmn=<your second bpmn file>] [--bpmn=...] --sim=<your first sim file> [--sim=<your second sim file>] [--sim=...] [--output=<your output path>]

We could consider choosing a better layout. That's just my first try.

Git LFS

Since .jar-files should't be version controlled, because they are large binary files, I've activated git lfs to keep the repo clean. Git LFS is limited in storage and bandwith and we have to check if our current limits are exhaustive. If not, we have to purchase more storage and bandwith or skip git lfs and disable it.

Reladed Issues

Steps to test or reproduce

Execute mvn '-Dtest=de.hpi.bpt.scylla.*Tests' test from the project directory to run all tests. That's the command executed by travis, too.

Impacted Areas in Application

List general components of the application that this PR will affect:

To Do

marcfreiheit commented 6 years ago

Can we close this pull request without merging it? It seems that it's not of interest? 😀

LeonBein commented 6 years ago

Actually it is of interest, I just have not had the time yet to handle it and it seems like Björn has built a little JUnit test. We can discuss this later or simply force push to another branch if necessary.

marcfreiheit commented 6 years ago

Copy that. If you've got any questions, please let me know.

LeonBein commented 6 years ago

Finally looking into this. Todo:

marcfreiheit commented 6 years ago

Sorry, didn't recognized your comment. Do you have any questions I could answer?

LeonBein commented 6 years ago

I think currently everything is ok, except I am not yet sure how to finally include the maven dependencies. I moved them to the local maven repository, but that requires them to be installed there manually. I will have to figure something out, especially regarding the plugin structure of Scylla.