uKnit FAQ
1. Is there is any uKnit plugin for Eclipse or IntelliJ?
Configuration involved to generate the test class is trivial, and once basic setup is done only uknit.source.class needs change; plugin is overkill. Then again based on acceptance of uKnit by the developers we may plan to release plugins in future.
2. Is tests generated by uKnit are accurate and complete?
The objective of uKnit project is to assist developers by reducing coding and typing a test class. Many testing practices are subjective in nature and it difficult to cover all the areas. While great effort is taken to cover many aspects, still many are far from perfect.
Developer has to inspect the test class generated by uKnit and fix test errors, enhance the robustness of the test and code coverage etc.,
3. What is the level of code coverage of uKnit generated tests.
It ranges from 50 to 90%.
4. Why some variables are initialized with source expressions?
uKnit can’t evaluate runtime value of expressions. To overcome this, in many cases it passes the expressions from source to test. Take the following example,
boolean flg = false;
File a = flg ? f1 : f2;
ideally this should result as single expression File a = f2;
in test, but uKnit passes the above code directly to test as it can’t evaluate the expression flg ? f1 : f2
.
5. Whether all types of control flow are handled by uKnit?
uKnit handles if else and try catch control flow and generate separate test method for each path in them. It generate single test method for other control flow expression such as conditional expression, switch case etc., Moreover, it if-else and try-catch in internal methods such as private or super class methods are not handled at present. In all these cases developers has to copy and paste the test method created by uKnit and refactor it for all other paths.