Work Day 25: Fun with GUnit Testing

I’m in GUnit testing hell. My mentor is back. In answer to my confusion he explained that l needed to do a GUnit test, if the pcf code I changed uses Java and Gosu utility classes. It took me a good hour or so to trace through to see where these classes were—sure enough, the pcfs use several utility classes.

I’m not entirely sure I set everything up correctly for the test. All the utility classes are part of Java or Gosu “packages” which l don’t think you put under “gtest.” There was one class not in that category, which appeared to already be in the gtest path. I painstakingly followed all the directions to set up an “All Tests” GUnit run in Guidewire. There were a total of 1008 tests to run—35 failed. I’m not sure what the hell that even means. I suspect I’m going to need to meet with my mentor to figure all this out. There is some sort of mechanism to ignore certain tests, if not applicable. I’m hoping that was the issue—that I just needed to exclude certain non-applicable tests (and not that I’ve managed to screw up the entire application with my two small changes).

I also realized after the fact that I should have written a test to include that would have tested my ACTUAL change. I thought that this was an all-encompassing test, and that my change would be tested with everything else by osmosis or something. If you held a loaded gun at my head, I couldn’t begin to figure out how to write one. I looked at one of the gtest files and it was so confusing I almost fell into a dead faint.

I have this horrible feeling that figuring this out is going to involve another Pluralsight video…

Work Day 24: I think I can…I think I can…

Well, Friday I managed to complete what I can for unit testing with the local machine data I have. The good news is that I had data for two lines of business that are very different, so it was a good test. Now I just have to figure out if I need to do a GUnit test for this, too, and when I’ll need to have a code review done. I’m going to have to wait for the January branch to open up before I add my changes officially. I swear, trying to figure out all this procedural stuff is WAY more complicated than the actual change was! My mentor is going to be back Monday, so I can bend his ear then. I’ve been looking at the backlog again, and I think I’ve pinpointed another story that’s similar to this one that I might be able to pull off…

Also, our continuing ed sessions with our instructor begin in earnest on Wednesday. I’m going to have to go over the repo we’ll be using.

It’s a beautiful thing…I don’t dread Mondays anymore!

On a crafting note, in addition to the new sweater project, I’ve lost my mind and joined the Annie’s Attic “Striped Crochet Afghan Club.” You receive enough yarn and a pattern each month to crochet three stripes of an afghan. At the end of the year, you end up with the final product. I’m thinking this will make a nice present for someone. It’s not taking me terribly long to do these…I’m tempted to search my stash for some spare yarn, so that I can have two of these projects going simultaneously.

Of course, I might want to see how much homework I’ll be getting on Wednesday before I decide anything…

Work Day 23: Holy Cow…It WORKS!

This morning, after peering at files, searching for fo:table-layout=“auto”, tracing through all our code to see how a PDF export is triggered, scouring for ANY reference to Apache FOP (fun fact: FOP stands for Formatting Objects Processor) errors, I did a Google search on the specific error again and hit upon a reference about the columns widths needing to be specified. I check the two grids and THAT WAS THE DIFFERENCE. The grid that worked for the PDF export had column widths specified. The other grid had some specified, but not all. Once I added column widths and wrapLabel=“true” the PDF generated!

Now I just have to figure out how to unit-test. I did one test for one type of business and everything worked out perfectly. I’m having a devil of a time trying to test other business types due to the test data on my local machine being LAME. No other business type appears to have fully-fleshed-out claims with reserves and payment transactions to test for my change. If I could figure out how to query the db files for my local machine, I could get a better idea of what data is actually available.

The Alum suggested perhaps creating a “patch” for my coding changes, and then trying to figure out how to connect to one of the lower environments, employing my patch. I was confused back at “patch,” never mind the rest of that sentence.

And don’t even MENTION that dreaded “GUnit” test…

On a non-coding note, I’ve begun casting on for my new sweater! I still have to wash and block the sheep sweater I’ve been working on all summer. It’s probably going to be next Spring before I finish the new sweater, but at least it will be a nice, easy project to do during my continuing coding education saga.

Work Day 22: Day 2 of the “simple” story…

The next time I say that a user story is easy and a slam-dunk, someone tell me to shut up…

I’ve managed to get everything to work except for the PDF export for one of the grids. Weirdly, the seemingly wider PDF export is fine. The shorter one is still throwing a damn Apache FOP error. I had the Alum help me for two hours, and neither of us could make a dent in the issue. We even tried getting rid of a field, and even THAT didn’t work. I did google the error, and there are some suggestions online on how to deal with similar issues. However, I can’t figure out WHERE you’d plug in the code. I could just post my issue on one of the sites. My mentor is out until next Monday, or I would have asked him.

Thankfully, this user story is slated for the January release, so I still have plenty of time to figure it out.

Also, not to be too Pollyanna, but the other good news is that, in the process, the Alum showed me a lot of tricks to using Guidewire Studio that I hadn’t known. She showed me how to detach the debugging screen from the main window, so that you can a) get a larger view, and b) watch what’s going on as you do changes. Also, I couldn’t figure out for the life of me how to do a global search (tiny magnifying glass icon at the top right of the screen—DUH). The most valuable thing I learned was that if you click CTRL and then click on anything in the pcf code, you’re brought right to the underlying Gosu code!

Work Day 21: Fitting a square peg…

I’m happy to report that I’ve just about figured out the fix for my user story…okay, almost. There is a SLIGHT issue with the export to a PDF. The Excel exports are fine, but I’m getting big ugly errors for the PDF export. I suspect it’s due to the existing PDF already having entirely too many fields on the page, and now I’m plopping in one more field. Either I’m going to have to experiment with narrowing the fields in the pcf, or we may need to go to Option B—jettisoning an existing, less important field. I tried to see if l could modify the one PDF, perhaps to make a smaller font, but the configurations appear to be such that a change to one would constitute a change to ALL the PDF exports for the application, period. As much as I’d love to think I’m that frightfully important, the rest of the building (and all the offices countrywide) would probably prefer their PDFs to be a font size that doesn’t require a magnifying glass to make out the payment information.

My mentor is still out, but I’m going to consult with The Alum tomorrow to see if she has any insight into this issue. Perhaps there’s something I’m missing.

Work Day 20: I got a live one…

After an hour of falling asleep to yet another Java video, I’d had it. I decided to check our agile backlog for user stories that I might be able to manage. Several stories down, I FOUND ONE. It’s a very simple story where one needs to add “Invoice Received Date” to the payment transaction screen. I also have to make sure a person can download this field with all the other fields in an Excel file and in a pdf (which may be trickier), but it looks, overall, like a simple enhancement. I checked with our product owner, and she’s good with the fact that this might take me a while, seeing as it will be my first story. The thing has been out on the backlog for 95 days, so it’s not like anyone has been screaming for it. I know this sounds confusing, seeing as I said “agile”. We actually work Kanban, so I don’t have to have this done for a sprint. I will, however, have to keep an eye on our release dates.

I’m just so thrilled to finally have some real work to do!

Work Day 19: A Class Act

On Friday, I did some more work with coderbyte. I figured out how to take each of the exercises and make some standalone Java classes. It gave me a bit more insight into how the syntax works. I tried to figure out how to take these same exercises and create them in Gosu, but that was one big goose egg. The Gosu Reference Guide is almost impossible to follow when it comes to looking up how to do a certain type of function/method. I do want to ultimately crack this, though, so that I can understand Gosu better. Unfortunately, Gosu is not a language where you can google your way to a solution. The entire thing is locked down tighter than Fort Knox.

I was going to watch the Pluralsight Spring Batch video, but I didn’t. I do still need to understand how that whole process works, if I’m going to be able to function on my team. We do have a lot of user stores that deal with integration.

On a more exciting note, my Saturday was spent at the New England Fiber Festival!

https://www.easternstatesexposition.com/events/2019/fiberfestival

We had a fantastic time! I confess there were yarn purchases. I bought eight skeins of stunningly beautiful yarn to make a sweater for myself. I picked a simple pattern that a) will look good on me, and b) will be a no-brainer to work on as I spend my upcoming months cracking code.

SW Merino – Bulky

%100 Superwash Merino

108 yds

Hand Dyed – “Brew”

www.yarnhygge.com

Work Day 18: Exercisin’ Java

I’m happy to report our instructor sent us a very cool site to do Java exercises:

https://coderbyte.com/challenges

It’s a bit less intimidating than codingbat. I managed to do quite a few of the exercises. I saved all of them, with tons of comments, so that I have a ready reference of the different types of functions. One of my side projects is going to be to see if I can write these same types of functions using Gosu. Speaking of Gosu, I did some experimenting for the first time with the code on my local machine. Not much of anything happened, but at least I took the risk. I was going to go hog-wild and do something mad like deleting a button, but that seemed somehow wrong. At the very least, I think I’m finally at a point where I can at least try out a small user story (low, low, LOW down in the list, and something no one will flip out over if it’s not done in a timely manner). I may need to figure out Spring Batch first, but I suppose I could try to do both.

You know, I’m really hoping that a year from now I’ll read this and roar with laughter over how far I’ve come by that point.

Work Day 17: Back to School!

…but all the other kids are WAY ahead of me.

Our first continuing ed session with our instructor was abbreviated. He’s having computer issues, so we mainly walked high-level through the object-oriented JavaScript code he’s got out in GitHub. We’re supposed to review this, and try to run it on our machines before our next session—later on, we’ll be doing more involved work, I’m sure. It looks like I’m going to have to get Node.js loaded onto my work laptop, as we’ll be using that. I’m not sure how well that’s going to interact with the rest of the apps on my computer. I think I’m going to ask my mentor and The Alum for their thoughts. I could possibly just do all the continuing ed work on my home laptop to be on the safe side…I’m going to load a copy of his GitHub code there anyway.

We also spent a good deal of time going over how we all are doing in our new jobs. Some people are doing very well, as either a) they don’t need Java, and/or b) they have people they can shadow. I’m at a standstill, as I’m still learning Java and Gosu, which is going GLACIALLY slowly. Honestly, I’m getting the most bang for my buck from the Udemy course at home, but it’s not very fast-paced. Some people in class have had good success using the online CodeAcademy site. I’m tempted to check it out, but realistically, between Udemy, Tutorialspoint, Pluralsight (zzzz…), studying our current code, and trying to learn Gosu (and somewhere in here I have to learn Spring Batch), I think I have enough going on. If I try to add one more learning tool, I’m pretty sure my head is going to explode.

This afternoon, a good friend pointed out that I should give myself a break. If nothing else, I’ve only had a decent work laptop on which to do ANYTHING for a short time now.

I hate feeling useless, though.

Work Day 16: I DID want something to do…

As I had yesterday off, my day count is now odd…

I had a horrendous dream last night that we had to PAY for our continuing ed with our Code Academy instructor. We had to go on a communal computer to do it, and the mouse turned into a REAL mouse…the tiny squeaky kind with little whiskers. I’m probably dreaming this because our first continuing ed session is tomorrow morning. Sadly, our instructor is not going to cover Java (which half of us need), but he’s promised to cover object-oriented programming principles, which can be applied to our Java self-learning. I’m really hoping it will help, as I’m still somewhat confused about it.

The good news is that I actually did some real work today. Our agile team was flipped a defect. Sometime between the last release and the upcoming one, our system now lets one put in an amount WAY over the amount one should. To preserve confidentiality, I won’t say what or where this is in the system—suffice it to say, it’s a big honking problem. While I didn’t solve the issue (no one has, yet), I did manage to figure out where to look in the code, and how to connect and trace everything back—just the thing I didn’t think I’d ever figure out. I managed to slam up against the java APIs, which are sort of a black box to me (from asking around, I get the impression that they are black boxes to a lot of people). The next thing we’ve been investigating is to see what changed between the two releases. Seeing as SEVERAL different groups have user stories in any given release, and there are several different repos for our systems, this isn’t as easy as it sounds.

Doing the continuing ed tomorrow is probably going to be a walk in the park, in comparison…