Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement tests #9

Open
9 of 16 tasks
jancborchardt opened this issue Nov 9, 2016 · 5 comments
Open
9 of 16 tasks

Implement tests #9

jancborchardt opened this issue Nov 9, 2016 · 5 comments

Comments

@jancborchardt
Copy link
Member

jancborchardt commented Nov 9, 2016

(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

@paulschwoerer
Copy link
Contributor

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?

@jancborchardt
Copy link
Member Author

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

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

@julien-nc
Copy link
Member

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

@ChristophWurst
Copy link
Member

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

@paulschwoerer
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants