Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News AI-Based Code-Completion Tool Tabnine Now Offers Automatic Unit Test Generation

AI-Based Code-Completion Tool Tabnine Now Offers Automatic Unit Test Generation


One of the pioneers in the field, Tabnine is a code completion assistant that uses generative AI to predict and suggest the next lines of code based on its surrounding context. Tabnine is now opening beta access to new capabilities aimed to generate unit tests.

Unit testing was proclaimed dead by Rails developer David Heinemeier Hansson in 2014. It was possibly at that moment that the developer community started to split into two camps: those who defended unit testing and those who insisted on integration testing as a better way to ensure the proper behaviour of a software system.

In fact, Unit testing is often considered a tedious and time-consuming task, which is thus neglected by many developers, says Tabnine. This is why they extended their vision AI-based software development life-cycle by adding unit testing generation to their assistant:

Our new unit test generation capability uses cutting-edge AI technology to generate unit tests for your code automatically, helping ensure that your code is rigorously tested, resulting in fewer bugs and better code stability – especially important for larger projects or projects with tight deadlines.

The tool supports several languages, including Python, Java, and JavaScript, and is integrated with Visual Studio Code and JetBrains IDEs. According to Tabnine, the tool is able not only to generate unit tests, but also to learn how to match them to the developer coding style and patterns.

Tabnine is able to provide code completions on three different levels by completing a line, completing a whole function, or converting natural language comments into code. It can run either in the Cloud or on premises to match distinct privacy and compliance requirements. It must be noted that Tabnine code completion supports a larger set of languages than unit testing generation, additionally including Rust, Go, and Bash.

In the last year several services have been launched to generate code suggestions, including GitHub Copilot, AWS CodeWhisperer, OpenAI Codex and others. Tabnine is the first to also provide unit testing generation.

On a related note, Tabnine has also announced it has reached 1M+ monthly users.

About the Author

Rate this Article