BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

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

Bookmarks

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

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • How exactly is automated test generation useful?

    by Chris Richardson,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Presumably that tests what the code should do rather than what it needs to do.

    The reverse of TDD.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT