You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using JenkinsPipelineSpecification to write tests in my project but in this case, readProperties are mocked and test will not detect that I have typo in parameter default. Also, the compiler will not fail. Is it possible to set up a test to fail or somehow configure to really call readProperties step ? Mocking using 1 * getPipelineMock("readProperties")(default:["x":"valueX"],file:"./appId/env.properties") >> ["y" : "valueY"] doesn't help as there is same typo as in the method implementation
Benefits
Detecting such typos during a test is much more efficient than deploy to Jenkins and test manually
The text was updated successfully, but these errors were encountered:
Yes, that's what I need. There is method readProperties ( from the "Pipeline Utility Steps plugin") which expects "defaults" on input in my example, but I used "default". The test passes because I also used "default" in the getPipelineMock. I would like to find these types of errors/typos before deploying to Jenkins.
Desired Behavior
I have simple class method wich I want to test :
I'm using JenkinsPipelineSpecification to write tests in my project but in this case, readProperties are mocked and test will not detect that I have typo in parameter default. Also, the compiler will not fail. Is it possible to set up a test to fail or somehow configure to really call readProperties step ? Mocking using
1 * getPipelineMock("readProperties")(default:["x":"valueX"],file:"./appId/env.properties") >> ["y" : "valueY"]
doesn't help as there is same typo as in the method implementationBenefits
The text was updated successfully, but these errors were encountered: