You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See `java -jar cmd/target/scala-2.12/docile.jar --help` for more options.
68
74
69
75
If you're looking for a Central System to run docile-charge-point against, check [SteVe](https://github.com/RWTH-i5-IDSG/steve) or [OCPP 1.6 Backend](https://github.com/gertjana/ocpp16-backend).
70
76
@@ -198,15 +204,15 @@ transaction, I will see that one script failed and the other one passed. In the
The `-i` option here tells `docile-charge-point` to go into interactive mode.
@@ -408,6 +406,8 @@ There is now a Dockerfile included, so you can run it in Docker if you want. Als
408
406
To run it in Docker, do:
409
407
410
408
```
409
+
$ sbt assembly
410
+
411
411
$ docker build -t docile-charge-point:latest .
412
412
413
413
$ docker run --rm -it docile-charge-point:latest
@@ -427,7 +427,7 @@ For maximum flexibility, you can embed docile-charge-point as a library dependen
427
427
To make docile-charge-point a dependency of your Scala project, add this to your library dependencies in your `build.sbt`:
428
428
429
429
```scala
430
-
"com.newmotion"%%"docile-charge-point"%"0.4.1"
430
+
"com.newmotion"%%"docile-charge-point"%"0.5.0"
431
431
```
432
432
433
433
and make sure that the NewMotion Nexus repository is in your sources by adding this to your `project/plugins.sbt`:
@@ -436,7 +436,30 @@ and make sure that the NewMotion Nexus repository is in your sources by adding t
436
436
resolvers +="TNM" at "http://nexus.thenewmotion.com/content/groups/public"
437
437
```
438
438
439
-
Then you can create test cases as instances of `chargepoint.docile.dsl.OcppTest` in your code and create instances of `chargepoint.docile.test.Runner` to execute them.
439
+
Then, in your code:
440
+
1. Create tests as instances of `chargepoint.docile.dsl.OcppTest` in your code
441
+
1. Combine them with a testcase name to be a [`chargepoint.docile.test.TestCase`](core/src/main/scala/chargepoint/docile/test/TestCase.scala)
442
+
1. Instantiate a [`chargepoint.docile.test.Runner`](core/src/main/scala/chargepoint/docile/test/Runner.scala) wrapping the test cases
443
+
1. Call the `.run()` method on the `Runner`, passing a [`chargepoint.docile.test.RunnerConfig`](core/src/main/scala/chargepoint/docile/test/Runner.scala) to specify how you'd like the test to be executed
444
+
445
+
### Loading test cases distributed separately as files
446
+
447
+
To load text files as test cases, you need another library as a dependency:
and of course also in this case the resolver in your `project/plugins.sbt`:
454
+
455
+
```scala
456
+
resolvers +="TNM" at "http://nexus.thenewmotion.com/content/groups/public"
457
+
```
458
+
459
+
Then you'll, besides all the classes for defining and running test cases
460
+
mentioned above, also have a [`chargepoint.docile.test.Loader`](loader/src/main/scala/chargepoint/docile/test/Loader.scala)
461
+
that has a few methods all called `runnerFor` that will give you a `Runner`
462
+
instance based on a file, `String` or `Array[Byte]` for a test case.
440
463
441
464
One example where this is done is the AWS Lambda and S3 integration in the [lambda](aws-lambda/) subproject in this repository. Run `sbt lambda/run` to compile and run that code.
0 commit comments