Replies: 3 comments
-
My use of Pester tests in this project is woefully inadequate and definitely incomplete. Unit and acceptance testing is definitely worth the time. I am trying to make a stronger effort with new modules to include Pester tests from the beginning. PSFunctionTools is a good example. The key is to commit upfront. LIke writing documentation as you go along, if you don't do it, you'll never do it. That is probably the case with Pester tests and this module. It has nothing to do with the value of the test. Merely a matter of time, or lack of. |
Beta Was this translation helpful? Give feedback.
-
I asked for a couple of reasons. Isn't it true that some changes are so trivial that no unit test is really required? You made a simple one character change and performed a mental unit test. I learned this approach from somebody else who stated they stopped performing unit tests in a formal manner with Pester because the formality did not add enough value. Also, I am poised to fork the module and add a test to your test suite. I wouldn't want to disrupt the flow however, and I don't really want to upset the Test structure. |
Beta Was this translation helpful? Give feedback.
-
Another value for tests is to make sure I didn't break anything. Especially accidentally. I may think I only changed a few characters. But maybe I accidentally and unknowingly deleted a whole line of code. A Pester test could save me before publishing a release. Don't worry about upsetting anything. |
Beta Was this translation helpful? Give feedback.
-
I read one of your recent blog entries. You are working on using Pester 5.x in more or your work. Today, I cloned PSScriptTools. I opened a few of the closed issues. I see #117 is closed. I did not see a corresponding change in your "test suite". It is very likely the repair works.
Would you be able to elaborate on how valuable you think unit tests are? When would you decide you need to revamp your tests?
Beta Was this translation helpful? Give feedback.
All reactions