ts2 / ts2-sim-server

TS2 SimServer, the core of the TS2 Simulator
https://ts2.github.io
GNU General Public License v2.0
5 stars 9 forks source link

Improved test coverage #4

Closed npiganeau closed 5 years ago

codecov-io commented 5 years ago

Codecov Report

Merging #4 into master will increase coverage by 27.67%. The diff coverage is 63.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #4       +/-   ##
==========================================
+ Coverage   44.43%   72.1%   +27.67%     
==========================================
  Files          30      38        +8     
  Lines        1931    2384      +453     
==========================================
+ Hits          858    1719      +861     
+ Misses       1011     546      -465     
- Partials       62     119       +57
Impacted Files Coverage Δ
server/statik/statik.go 100% <ø> (ø)
main.go 0% <0%> (ø)
simulation/options.go 100% <100%> (+100%) :arrow_up:
simulation/messages.go 100% <100%> (+77.77%) :arrow_up:
server/hub.go 100% <100%> (+3.27%) :arrow_up:
simulation/signal_conditions.go 72.07% <100%> (+43.5%) :arrow_up:
server/hub_train.go 74.28% <100%> (ø) :arrow_up:
simulation/time.go 87.87% <100%> (+31.62%) :arrow_up:
simulation/events.go 50% <50%> (ø)
simulation/trains.go 43.58% <53.33%> (+37.64%) :arrow_up:
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 53906cc...c951364. Read the comment docs.

npiganeau commented 5 years ago

You can test already.

You have to start the sim server and load the simulation testdata/demo.json (format has changed slightly, so that's the only sim that can be read by the sim server).

Then you start the python client that will automatically connect to the sim server. Start with --debug to see the websocket messages in the console.

Most should work except:

You can interact with the simulation either from the python client and/or the web client and see the impact on the other.