Codium.AI - a tool to generate tests
Codium.AI is a VSCode extension powered by GPT models to generate test, code explanation and refactoring suggestions.
It can be installed here: https://www.codium.ai/install/vs-code/ A GitHub account is needed to use it.

It generates decent tests, but without using our testing wrappers like
renderWithProvider.
As it does not integrate well with our testing stack, it is not usable to write integration tests (which constitute the majority or our tests)
However, it really shines when it comes to unit tests. It generates multiple
tests for each function that cover multiple cases.
It also provides a "code analysis" which summarized the purpose of the function, it's argument and it's logic Below is an excerpt of the analysis. The full analysis is lengthy and verbose
The objective of the adaptChartData function is to transform the data points of a ChartData object into a format suitable for chart rendering, by mapping the values to the y-axis and the dates to the x-axis, relative to a given start date.
It also provides code suggestions like renaming some variables for more clarity
Suggestion:Â Rename 'adaptChartData' to 'convertChartData'
Why:Â The name 'convertChartData' better reflects the purpose of the function, which is to convert the input data to a different format.
Base Code:
// line number: 8
export const adaptChartData = (data: ChartData, startDate: Date) => {
const adaptedData = data.points.map((value) => ({
y: value.value,
t: differenceInDays(value.date, startDate) + 1,
}));
return adaptedData;
};
The suggestions are not amazing but they could be useful to find better names for function or bugs in some cases.
Behaviors and Edge cases​

Code Analysis​

Suggestions​

Why it is KO : Examples of incompatibilities with our test files :​
| Codium | BAM |
|---|---|
|  | ![]() |
| Codium | BAM |
|---|---|
|  | ![]() |
Cannot enter the components
Other issue :
Sends all the data to the codium servers

Conclusion​
Pros :
- analyses behaviors and edge cases
- generates a complete test file with description, flow etc
- gives good structure for the tests
- gives good results for unit tests
Cons :
- cannot enter inside the components

