Testing with Spring boot framework

It is a long time when I wrote something about my work. It could seem that nothing new is doing but it isn’t true at all. I am all the time learning something new, such as this week. I have met new framework in JAVA – Spring is its name 🙂

So far when I needed to automate some application (I mean web application) I used a selenium (respectively webDriver) framework. During my short career,  I switched lots of programming languages – PHP, C# and  Java now. So I use the combination of JUnit and webDriver.

To be honest, I am not any professional in programming and I don’t have any ambitious to explain or write in more deep anything about any of mentioned frameworks 🙂 On the Internet, you can find lots of more professional articles that can give you an imagination what the main purpose is.

I only wanted to say a few words about Spring. Respectively I am investigating how to write unit and integration test cases with Spring boot tester framework. During one week, I had a possibility to write and launch my very easy example of REST application (understand: one class as an entity, one class as a data repository, another class as a controller and of course the classes for own test).

I must confess that almost everything is new for me. I knew the MVC paradigm but just now I understood why I should write some interfaces and implement them in another class. It was the first time when I used the mocking. Maybe it is embarrassing for someone who works at IT but now I understood what dependency injection is. To be honest, I needed concrete real example, not any abstract theoretical describing 🙂

And why am I writing about dependency injection? Since Spring is a framework that supports it and I can use the annotation (@autowired, @component, @entity and so on). I really love it. Hm, it sounds strange 🙂

I am looking forward to next week since I should start writing my first „unit tests“ in Spring Boot with JUnit and Java, of course. I only hope not to make my colleagues disappointed. I will do my best. But there are so many new things – zuul, Spring, Jenkins, GIT (actually, I worked with version system but still I am worried that I break dev environment).

 

Napsat komentář

Vaše emailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *