71



This week is awesome and we are learning Spring Boot Java JPA/ORM framework and it works really well, albeit a bit much on the side of info-overload. I'm a little behind on the learning curve, but things are starting to work now and I'm getting it quicker and quicker I think. I just now finally got create working request to database via parameters and am now working on update. Since I'm quite pressed for time, being behind, I still haven't gotten to the unit tests, so I'm just going to answer the required questions for class here:

In your own words, what is TDD about?

Test Driven Design to me is about looking at what you are creating from all possible angles to minimize tricky-to-spot inconsistencies later. At this stage in my knowledge process, although this could change, I also feel like it's a little about guaranteeing you understand the tools you are working with enough to be able to forward and backward engineer them so to speak, writing what you want to work and writing the reverse for each, plugs for the interface that don't depend on the rest of the program, or, as little as possible. Incrementally as little as possible, I assume, because that's the challenge of testing, isolating what you're testing from everything but the test framework. The test framework can also be faulty, which adds to my insight that using the framework helps guarantee you understand the tools you're using. The question also leads into the next question, which is:

What is a MOCK (also called DOUBLE) and how does it help in unit testing?

A mock is the fake interface I'm referring to that the units you're testing interface with, instead of the real program. We create the mocks as pretend-programs, with as much known data just hard-coded into the mock or whatever method is used outside as much as possible of using data from the rest of the program. It's like in the movie Mars Attacks, when the aliens capture the scientist (Pierce Brosnan) connect his head to electrodes instead of his body, the electrodes are a mock there, for the scientist's displaced body. In our work, mocks are classes in our program we create that interface with whatever we're testing. I'm in the middle of learning more what they are exactly in terms of actually making, so I'm going to get back to that so I can finish as much as possible before it's due.

Also, how do mocks help testing: the idea is that you know exactly what's in it so you use assert and checks to tell the program what the answers are going to be, and as much as possible is automated by the IDE, giving you at least a rough indication whether your features are working or not.


Comments

Popular posts from this blog

Module 2 Learning Journal 1-19-21

Service Learning Journal 56, Friday week 8 CST-462s Race,gender, Class in the Digital World

Arlon's CSUMB ProSeminar CST300 Module 4 Learning Journal for the week Wed 1/27-Tues 2/2, year 2021