What I learned ① ~ DJUnit ~

Introduction

About ** "DJ Unit" ** that I use for testing I would like to summarize it easily.

As a ** entrance ** for those who are new to testing this article I hope I can help you even a little.

About DJ Unit

At first I was confused as to "Is it different from JUnit?" Apparently it can be considered almost the same.

If there is one difference from JUnit, When you run DJUnit, you can use the coverage report. ↓ カバレッジ.jpg What is coverage in testing ... To put it simply, What percentage of the total source to be tested could be confirmed (covered)!

In other words, DJ Unit is functionally ** JUnit ** makes it easy to see the coverage report visually.

After executing the test, in the source to be tested, ** So that you can see where the test actually went and where it didn't. ** It is a specification that wavy lines are attached to places where it is not flowing. It's very convenient because you can immediately see which part is not covered!

When I actually made a test source and let it flow, It often falls in unexpected places. So if you follow the above wavy line, where did you fall? It can also be a clue to identify the cause. (If it fails at the call point of another class, is Mock not working?)

Coverage reports can be easily exported, so You can easily leave it as evidence. (From the icon on the upper right in the image) If you have the opportunity, please take advantage of it.

in conclusion

As one of the things I learned through my work, I briefly wrote about DJ Unit. To be honest, I only write things that will come out immediately if you search, I tried to summarize it in words that are as close to my voice as possible. Rather than searching online or in books to get this knowledge from a lot of information I think it's easy to understand as an entrance.

In the next article, I would like to briefly summarize ** "Mock" **.

Recommended Posts

What I learned ① ~ DJUnit ~
What i learned
What I learned ② ~ Mock ~
What I learned about Kotlin
What I learned from studying Rails
What I learned with Java Gold
What I learned with Java Silver
What I learned through the swift teacher
What I learned from Java monetary calculation
Summary of what I learned about Spring Boot
What I learned in Java (Part 2) What are variables?
Summary of what I learned in Spring Batch
I will write what I learned about docker anyway (second)
What I learned in Java (Part 3) Instruction execution statement
What I learned when building a server in Java
[Rilas] What I learned in implementing the pagination function.
I will write what I learned about docker anyway (first)
What I researched about Java 8
I knew what reflection was
What you learned about hashes
What you learned about symbols
What I researched about Java 7
What I researched about Java 5
What I learned in Java (Part 4) Conditional branching and repetition
Beginner Ruby on Rails What I learned is being summarized
[Note] What I learned in half a year from inexperienced (Java)
[Note] What I learned in half a year from inexperienced (Java) (1)
[Note] What I learned in half a year from inexperienced (Java) (3)
What I learned from doing Java work with Visual Studio Code
What I researched about Java learning
[Rails] What I learned from a little stumbling block when using ancestry
What I investigated in Wagby development Note 1
Take what you've learned about Java reflection
What Rails beginners learned by solving errors
Twitter marketing? What if I automate it?
What I got into @Transactional in Spring
What is Docker? I tried to summarize
What I stumbled upon when installing Laravel-filemanager