@@ -10,23 +10,32 @@ parameters to methods in order to force the execution of codepaths.
1010Think about it as a fuzzy testing framework with limited fuzziness capabilities and absolutely no meaningful impact to
1111the improvement of code quality and confidence.
1212
13- It is also an answer to the common interview question: _ Can you have a project with 100% code coverage and still have
13+ It is also _ an _ answer to the common interview question: _ Can you have a project with 100% code coverage and still have
1414bugs?_
1515
1616#### Disclaimer:
1717
1818In case it is not obvious: This is a joke (but fully functional) library which was born out of a discussion about how
1919code coverage metrics can be abused and artificially inflated.
2020
21- * ** DO NOT USE THIS PROJECT AS A WAY TO ENSURE QUALITY OR TO VALIDATE ANY CONTRACTS OR BEHAVIOUR**
22- * ** THIS PROJECT WILL (BY DESIGN) TRY AND EXECUTE AS MUCH CODE AS POSSIBLE IN YOUR CODEBASE WITH NO MEASURE OR
23- REASON, SO ANY POTENTIALLY DESTRUCTIVE ACTIONS WILL ALSO BE EXECUTED.**
24- * ** BY USING THIS, AND DEPENDING ON HOW YOUR CODE IS STRUCTURED, YOU MAY END UP MAKING UNEXPECTED NETWORK CALLS**
25- * ** DO NOT USE WITHOUT BACKUPS**
21+ THIS LIBRARY WILL TRY AND EXECUTE AS MUCH CODE AS POSSIBLE IN YOUR CODEBASE (AND ANY DEPENDENCIES) WITH NO MEASURE OR
22+ REASON (UNLESS ** YOU** SET UP THE FILTERS CORRECTLY), _ SO ** POTENTIALLY DESTRUCTIVE OR COST-INCURRING** ACTIONS ** WILL**
23+ ALSO ** BE** ** EXECUTED** _ .
2624
27- Use at your own risk. I bear absolutely no responsibility for any runaway (or unexpected) `Runtime.getRuntime()
25+ * Do not use without backups
26+ * By using this (UNLESS ** YOU** SET UP THE FILTERS CORRECTLY), and depending on how your code is structured, you may end
27+ up making unexpected network/db calls
28+ * Do not use this project as a way to ensure quality or to validate any contracts or behaviour
29+
30+ Use at your own risk.
31+
32+ I bear absolutely no responsibility for any runaway (or unexpected) `Runtime.getRuntime()
2833.exec("rm -rf ./")` or ` FileUtils.deleteDirectory(new File("./"));` or ` DROP TABLE`s or similar that you get smitten
29- with by running this library.
34+ with when using this library.
35+
36+ I also bear no responsibility for any financial damages incurred in any way, say because 1000s of images were spun up,
37+ or all your data were moved out/in of Glacier, or your employer/customer is wondering where his code is now, or 1000s of
38+ push messages were sent, etc.
3039
3140If you still want to use this, and you know where the destructive stuff are, you _ can_ exclude any relevant code via
3241the ` @Config ` filters (see below) - I still bear no responsibility though!
@@ -36,25 +45,43 @@ the `@Config` filters (see below) - I still bear no responsibility though!
3645Note: There are examples in the ` test ` folder of the included ` testapp ` . There is also an example at the bottom of this
3746README.
3847
39- Maven Setup :
48+ ### To get going you need to :
4049
41- ```
42- TODO: ADD INSTRUCTIONS
43- ```
44-
45- To get going you need to:
46-
47- 1 . Add the library as a dependency to your project, as per above
50+ 1 . Add the library as a dependency to your project (see next section)
48512 . Create a test class - you can call it anything you want
49523 . Make it implement one (or more) of the following interfaces
5053 * ` PlasterageTestEquals `
5154 * ` PlasterageTestHashCode `
5255 * ` PlasterageTestToString `
5356 * ` PlasterageTests ` - this is a convenience interface which implements all of the above.
54- 4 . Create the proposed methods and annotate them with ` @Test ` . They can be empty, or contain code - they will never be
57+ 4 . Create the proposed methods and annotate them with ` @Test ` . They should be empty - any code in them will never be
5558 executed.
56595 . Annotate the class with ` @RunWith(CodeplasterageTestRunner::class) `
57- 6 . Configure the tests by using the ` @Config ` annotation (see below)
60+ 6 . Optionally (but you really _ do_ want to), configure the tests by using the ` @Config ` annotation (see below)
61+
62+ ### Adding the dependency:
63+
64+ To add this library as a dependency you need to:
65+
66+ * Add the github package repo in your ` build.gradle ` :
67+
68+ ``` groovy
69+ repositories {
70+ maven {
71+ url = "https://maven.pkg.github.com/alt236/codeplasterage"
72+ }
73+ }
74+ ```
75+
76+ * Add the dependency itself:
77+
78+ ``` groovy
79+ dependencies {
80+ testImplementation 'uk.co.alt236:codeplasterage:{latest-version}'
81+ }
82+ ```
83+
84+ You can find the latest version here: https://github.com/alt236/codeplasterage/packages/
5885
5986## Configuration
6087
0 commit comments