flydev Posted January 14, 2019 Posted January 14, 2019 (edited) I don't fully understand the question, so a simple answer, yes with PHPUnit. And people was already doing it 6 years ago : https://github.com/niklaka/ProcessWireTests Edited January 14, 2019 by flydev Forum thread 5
teppo Posted January 14, 2019 Posted January 14, 2019 @flydev, thanks for linking that thread – I had already forgotten the whole thing. Will come in handy for a project I'm currently working on ? That being said, TDD or test-driven development is a pretty specific process: essentially you define what the app should do (success criteria), create tests based on that, and finally write code to fulfil those tests. Iterate this until you have a complete application. I haven't heard anyone developing ProcessWire stuff like that, but technically it's doable, although it obviously depends a lot on what you're actually building with ProcessWire. For most sites out there I'd argue that TDD probably isn't the easiest thing to pull off, or perhaps even the most sensible approach. In my opinion it's more suitable to application development. The front-end layer alone adds loads of complexity to the equation. I'd love to hear if anyone is actually doing this in our context though ? 2
flydev Posted January 14, 2019 Posted January 14, 2019 26 minutes ago, teppo said: In my opinion it's more suitable to application development. True, for example, I didn't written any test for our frontend, but the backend and the module managing the transactions with financial data is fully unit tested, and it's required (while writing that, I am thinking on what we discussed on Github about the example of the float type vs the integer one for managing financial data; Imagine the things without test... houston.. ?? ). 2
bernhard Posted January 23, 2019 Posted January 23, 2019 Glad to see you again, @Nvim! @Pete, are you also happy?
szabesz Posted January 23, 2019 Posted January 23, 2019 (edited) Well, test driven development would be useful for sure, so he is still talking about the topic even though the way he does so is not fruitful at all. Edited January 25, 2019 by szabesz typo
horst Posted January 24, 2019 Posted January 24, 2019 21 hours ago, szabesz said: ...so he is sill talking about... Definetly a typo here, but is it a missing "t" or a missing "y"? ? 2
teppo Posted January 24, 2019 Posted January 24, 2019 On 1/23/2019 at 12:08 AM, Nvim said: TDD should be built in Processwire. Please be a bit more specific. Why is this so important to you, and how would you envision it being implemented in the context of ProcessWire? Have you considered the possible solutions mentioned in this thread, and if so, what made you decide that they are not good enough? We're always happy to discuss new ideas and suggestions, but on the off chance that you're only posting these things in order to cause an argument, be aware that such behaviour won't be tolerated here. Thanks for giving your posts a bit more consideration from now on, and have a great day! 3 1
Nvim Posted February 12, 2019 Author Posted February 12, 2019 TDD has obvious benefits and PW will be better if it is built in, I'm considering to create a tool to integrate TDD with PW.
Recommended Posts