Maps: Implement tests

Created on 9 Nov 2016  路  5Comments  路  Source: nextcloud/maps

(Aand reopening another issue of yours @Henni :)

83 fixed phpunit. Now we should also use it to test the php backend.

Tests should be written for:

Controllers:

  • [ ] ContactsController
  • [ ] DevicesApiController
  • [ ] DevicesController
  • [ ] FavoritesApiController
  • [ ] FavoriteController
  • [ ] PageController
  • [ ] PhotosController
  • [ ] RoutingController
  • [ ] TracksController
  • [ ] UtlisController

Services:

  • [ ] AddressService
  • [ ] DevicesService
  • [ ] FavoritesService
  • [ ] GeophotoService
  • [ ] PhotofilesService
  • [ ] TracksService

@v1r0x As you implemented a lot of this, maybe you can also start creating tests.

This should either be part of Milestone 0.1 or 0.2

enhancement

Most helpful comment

@ChristophWurst Thanks, it really makes things so much easier!

All 5 comments

I've been working on tests for the public sharing API the last week, which got me thinking about streamlining the process for creating tests. I found this interesting article by Christoph Wurst.

I'd like to suggest using Christoph's framework for Unit and Integration tests. Especially using transactions for database roll backs sounds like a solid approach to me.

What do you guys think?

cc @eneiluj @tacruc what do you think? :)

And @ChristophWurst any input there since it鈥檚 about your testing framework? ;)

Yeah why not. The framework seems very nice!

I don't know why Travis CI script stopped being triggered at some point. Too many failures maybe.

I've added a Gitlab CI script at the root of the repo (.gitlab-ci.yml) which works(ed?) if you create a fork of Maps on Gitlab and push to "master" or "test" branch. That trick was good enough when I was actively developing.

I don't have much time to put in Maps dev these days :disappointed: .

@ChristophWurst Thanks, it really makes things so much easier!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mannp picture mannp  路  7Comments

Yetangitu picture Yetangitu  路  7Comments

ma12-co picture ma12-co  路  7Comments

paullbn picture paullbn  路  7Comments

jancborchardt picture jancborchardt  路  11Comments