maps icon indicating copy to clipboard operation
maps copied to clipboard

Implement tests

Open jancborchardt opened this issue 8 years ago β€’ 5 comments

(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:

  • [x] ContactsController
  • [x] DevicesApiController
  • [x] DevicesController
  • [x] FavoritesApiController
  • [x] FavoriteController
  • [x] PageController
  • [x] PhotosController
  • [x] RoutingController
  • [x] 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

jancborchardt avatar Nov 09 '16 10:11 jancborchardt

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?

paulschwoerer avatar Dec 01 '19 17:12 paulschwoerer

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

And @ChristophWurst any input there since it’s about your testing framework? ;)

jancborchardt avatar Dec 18 '19 15:12 jancborchardt

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: .

julien-nc avatar Dec 18 '19 16:12 julien-nc

Thanks for considering my little framework. If you need a reference setup just see https://github.com/nextcloud/mail/blob/5f44f0373b295102d963357bc171d0aeb00084bb/composer.json#L40 https://github.com/nextcloud/mail/blob/5f44f0373b295102d963357bc171d0aeb00084bb/composer.json#L46-L49 https://github.com/nextcloud/mail/tree/master/tests

ChristophWurst avatar Dec 19 '19 14:12 ChristophWurst

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

paulschwoerer avatar Dec 19 '19 22:12 paulschwoerer