K
K
Kirill Savinov2018-10-17 07:41:24
Java
Kirill Savinov, 2018-10-17 07:41:24

How to write tests for a VK bot?

In general, not long ago I began to get acquainted with JUnit, I have such a question. Let's say I'm writing a bot for vk.com and I need to test this bot. So far, I know that JUnit allows you to compare something and reveal the result when testing. But, in fact, in my example, I don’t need to compare anything, I need to write a method that would be separate from the assembly (i.e. I don’t want the method to participate in the assembly stage, because it is only needed for tests) and I could, for example, write some messages to vk.com, with the help of which I could determine for myself whether the test was passed or not.
It is not necessary to write exactly the implementation of the method, I want to know where to write this method, and how to use it as efficiently as possible

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
azShoo, 2018-10-17
@azShoo

Your tests should test your code. This is what assertions are for (the same comparison you are talking about).
What you described in "I want" are not tests, and it probably doesn't make sense to use JUnit for this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question