Fun with JUnits

…or, why I’m pretty sure I’m grayer than I used to be…if I wasn’t in fact hiding my gray. šŸ˜ˆ

The good news is that I’ve had a crash course in working with Spring Batch and I’m now a veritable expert in operating the debugger. I also now understand (somewhat) where to get the data for the payload by running only a few SQL queries against the test data from the UI and using the resultant payload for our JUnit tests. This is definitely a step up from my attempts to get data last week by running multiple queries and cutting and pasting all the information!

Monday, my coworker spend an hour of his life he’s never getting back showing me all this, while attempting to help me with the payload for my testing. The payload still isn’t exactly what one might call stable. I tested with and without my code change and thankfully that’s not the issue–I would have run screaming into the night if it was.

Sadly, I’m going to have to have him help me further, as I ran all the SQL queries I was supposed to to get my new example, but I’m not ending up with the same file format that our JUnit job requires. I’m not quite sure WHERE my coworker found the information, but I don’t think I quite have it.

The adventure continues…

Going Forward…

I’ve been pondering how to move forward with my blog. I know daily spleening about my ups and downs attempting to learn Java and JUnit testing are rather redundant and tedious. I may start blogging two or three times a week. If nothing else, I need extra time to finally make it through my Udemy course!

I’ve also been thinking about how to keep my JavaScript, HTML, Node.js, and CSS skills fresh. I ran into one of my fellow Code Academy classmates, and he mentioned needing to “use it or lose it.” It’s almost like a higher power was speaking directly to me. It’s interesting…our instructor has stressed the importance of having a side project, along with one’s coding at work. In fact, he explained that if you’re looking for a new job, the first thing employers want to see is what you have out on GitHub that you’re working on. I’ve asked around, though, and many developers at work have told me that there is no way in hell they ever have the spare time to do this–especially mothers with small children.

However, I think I have an idea, for something that might encompass keeping up my skills AND having fun with yarn. I’ve been googling. There are TONS of websites devoted to knitting pattern generators (knittingfool.com being one I’ve used), there don’t seem to be any crocheting pattern generators, other than for “graphgans,” which are afghans with a design or a picture on them. There are literally generators out there where you can scan in a picture of your dog and they will spit out a pattern (filet crochet, knitted, afghan crochet, single crochet, etc.) for you to make an afghan with Fido emblazoned on it. I’m thinking I could try a knitting generator, to get my feet wet; but I think I’d ultimately like to make a crochet sweater pattern generator. I’ve tried using ones for knitting, plugging in a crochet gauge instead, but the increases and decreases for crocheting are quite different, AND they’re different for different types of crochet stitches. I DO still have a domain name out there that I bought back when I did my first HTML/CSS project for class…

This could work…

Work Day 50: Seeing light at the end of the tunnel…

…that we really hope isnā€™t the on-coming train!

Iā€™m making slow, but steady progress on my JUnit issue…if you count ā€œfinally finding the right people to consultā€ as progress. My poor, long-suffering mentor is inundated with work for the upcoming release, so heā€™s tossed the ball back into my teamā€™s court (you know itā€™s bad when Iā€™m resorting to sports analogies). One of my team members figured out part of my issue. I definitely had no access to get a Nexus Repo Key for that Maven step for setting up Spring Batch. The good news is that I put in a tech support request, and I got access to get oneā€”miraculously in one day! At that point, I was totally fried, so Iā€™m going to attempt to do this tomorrow.

This brings me to the bad news. The other person on my team whoā€™s helping me…heā€™s in India. Yours Truly is going to get into work at the crack of dawn tomorrow morning to be ready to talk to him at 8:00 am. As much as Iā€™m very grateful to him, this is going to cut into my morning yarn time! In addition to my sock-knitting, Iā€™m also crocheting the Sophieā€™s Universe Afghan, which requires early morning quiet time, in order for me to concentrate. Itā€™s one of those maddening patterns where, even though Iā€™ve had oodles of years in crocheting experience, Iā€™m still frogging back practically every row, due to being hopelessly off in stitch count. Iā€™m only a few rows in, so far!

Work Day 48: My new toy!

I canā€™t remember if Iā€™ve mentioned it, but back when I was frantically trying to make ClaimCenter 9.0.7 work on my local machine, one of the things I had to do was to hook up my database. As I was adding in the drive path into the configuration file and the h2 jar file, I discovered something wonderful. To test the database connection, one clicks on the h2 jar file, and then clicks ā€œTest Connection.ā€ If ā€œTest Successfulā€ pops up, then youā€™re good. Now, youā€™d hit ā€œConnect.ā€ WELL…when I did this, a SQL window popped up, with all the data files listed, such as youā€™d see for the test and production Oracle environments in Oracle SQL. For hoo-has, I experimented and plugged in one of my production queries, minus the ā€œgwccā€ prefix, and IT WORKED! I now have a way other than the Gosu Scratchpad to query my local database to see what it contains! I proceeded to try all my queries and they all worked. The only ones that donā€™t are the integration ones, as that information wouldnā€™t be under this schema.

Speaking of integration, I found out that our integration repository for March wonā€™t be out until next week. In the meantime, Iā€™ve still been trying to familiarize myself with Spring Batch. One of my coworkers, who deserves a medal in sainthood, was trying to show me how to create JTests for my integration code change…he was saved by his ride arriving to pick him up. While it was somewhat confusing, I think I got the gist of what he was showing me, so Iā€™m going to continue on with it tomorrow.

Work Day 47: Well, I THOUGHT I was brilliant…

Remember my great stroke of genius in discovering Iā€™d only need to add one argument to pass to that one method to fix the driver age being passed to our other system?

Thereā€™s good news and bad news. The good news is that my mentor helped me determine the correct version of the integration repository to clone to make my changes (short answer: it doesnā€™t exist yet for the March release). He helped me with my Eclipse setup, so that I can eventually make my changeā€”for now, Iā€™m using the older repository code for this purpose. Creating a patch in Eclipse is similar to creating one in Guidewire Studio.

The bad news is that my ingenious idea to add one argument to pass into the method was a bust. I added my change in Eclipse only have have all sorts of angry little red Xs and other ugly notations pop up. Come to find out, I hadnā€™t thought to DEFINE the loss date field that gets passed with date of birth. Choking down my rising hysteria, I saw how date of birth was defined, and then I scoured the class until I found loss date defined somewhere else in a similar manner. I copied that code over to the code that calls the method and all the angry little squiggles went away! Whether or not this actually will work remains to be seen. Once the March repository becomes available Iā€™m going to hook everything up and test by entering some claims into my local UI and see if they pass correctly through the integration process.

Okay, thatā€™s how I imagine itā€™s going to go. Iā€™m sure the reality is going to 12 times more complicated than that. For one thing, I have to make this change work for five different scenarios. Also, Iā€™m casually using the expression ā€œhook upā€ for a process thatā€™s defined over 11 pages of documentation.

My poor mentor is going to deserve a medal for this…or at the very least hazard pay…

Workday #46: Spring Forward!

Since yesterday didn’t contain enough drama, I elected to multiply this tenfold by taking on a new user story. On the surface, it appears to be something I can handle–simply change the driver age for a commercial or personal auto claim so that the age is Age at Loss vs. Current Age so that it gets passed to our other system correctly. I waded into the integration code for Spring Batch in GitHub and I think I’ve narrowed down the issue to one method in one class. It appears to be an overloaded method, where if you only pass the date of birth parameter, you get the Current Age; however, if you pass the date of birth AND the date of loss parameters, you get the Age at Loss, which is what we’re after. I’ll have to scour all the code of course, to make sure, but I’m fairly certain that that’s all one would need to fix.

DOING this is going to be another matter. I have Eclipse installed on my work and home machines, and I’ve been working with it a bit it at home while doing the Udemy course; but I suspect it’s going to be a lot more complicated with our crazy GitHub branch system. I did try to follow the Spring Batch/Maven setup directions on the Wiki in our GitHub, but I can’t even get past Step One without being told I don’t have access to create a Maven User Token. No, I don’t know what that is, either, but right now it makes no difference, as I can’t create one.

I’m going to meet with my mentor on Monday, to hopefully figure all this out. The poor man, probably remembering the fiasco that was yesterday, put me off until Monday afternoon–probably sensing I’m going to need a lot of direction. My plan is to read over everything in advance, so I don’t waste his time.

Oh, I haven’t even gotten to the best part of the day. I hosed my new Guidewire 9.0.7 setup–as in, I accidentally DELETED the entire thing! I was attempting to be proactive by zipping up all the old files for 9.0.5 and deleting them, but in so doing I accidentally deleted the wrong files. On a more positive note, I really do have practice now installing a new version, and I even managed to connect the database correctly.

Work Day 45: Back in the Saddle Again!

…but what on earth are my passwords???

It was a very nice holiday break marked by good times with our family and friends, a few cleaning projects, finishing knitting projects, endless cookie-baking, and five extra pounds I need to get rid off. Alasā€”what with all the preparations, festivities, tinkering with new gadgets I got for presentsā€”I only got in ONE Udemy Java course session. The good news is that I hadnā€™t forgotten anything, so Iā€™m hopeful that once I get past the 3,456 emails in my inbox, that Iā€™ll be able to be somewhat functional.

…these were my thoughts BEFORE I got back to work and discovered weā€™ve gone from ClaimCenter 9.0.5 to 9.0.7. The email went out last week, when most people were out for Christmas. I had to update Guidewire, add in code for my two user stories (story #3 was usurped in my absence, due to requirement changes), retest them, and push everything out to GitHub for a code review again ā€” for FRIDAY. It took until 2:30 pm just to have 9.0.7 fully functional in my local. My only consolation was that I wasnā€™t aloneā€”other people had a ghastly time attempting the change. I took copious notes for the next time we have to go up a version, including additions to my ongoing error file, where I note down all the errors Iā€™ve encountered so far and how to resolve them.

And a Happy New Year to you, too!

Work Day 44: Wrapping it up…

…only a WEEK left to shop!!!

Iā€™m about to be off for the rest of the year, so today was a day of frantically wrapping everything up at work. With a coworkerā€™s help, I managed to solve my role story issueā€”I even crossed the big frontier of modifying a CLASS…with a new FUNCTION! Okay, he had to help me write it correctly in Gosu, but I did manage to figure out where it would go and what it would need to do. I even managed to avoid a tech-debt situation by putting the code in a class rather than in the pcf.

I donā€™t want to lose the knowledge Iā€™ve gained, so in addition to my frantic holiday shopping (yes, Iā€™m one of those people who runs out at the last minute), Iā€™m also planning to spend time every day on my Udemy Java course, and reviewing the Gosu documentation.

Oh, and of course there is important knitting and crocheting to be done! Iā€™m making progress on the sweater Iā€™m planning to wear for Christmas.

ļæ¼img_1405-1

Work Days 42 & 43: Surely You Mock

I knowā€¦Iā€™m combining TWO days in a row. In my defense, one could consider these two days to be a continuation of each other, as Iā€™ve been in Gosu hell since yesterday. Unbeknownst to us, someone–in the interest of anonymity, weā€™re going to call him Earl–pushed a GUnit test (like JUnit tests, only for Gosu) that uses Easymock 4.0.1 out to the release branch. Fun fact: many of us are still on Easymock 3.1. I found this out the hard way when I needed to do a fix for the role user story, but was dead in the water when I got two compiler errors after creating my branch from the release branch.

Come to find out, this has been an ongoing drama of ā€œDynastyā€ proportions since December 5. For my younger readers, that would correspond to ā€œReal Housewives of Beverly Hills-on-steriodsā€ drama, like that chick screaming to the cat in all the memes.

Anyhooā€¦The initial alarm was raised in home office with–in the interest of anonymity weā€™ll call this fellow Gungho Carl. Gungho complained back on December 5 that he couldnā€™t compile. Gungho is actually a kickass developer of uber nerd cred, so if HE canā€™t compile, thereā€™s something seriously WRONG. From there, for the next several days, there were a flurry of frantic emails back and forth with basically the known Gosu world within my company. The news eventually filtered down to our office in the sticks, and landed with my mentor. Heā€™d only informed a few people about how to fix this (including Earl), as I donā€™t think he realized how many of us were still on 3.1.

Per his instructions, I updated to Easymock 4.0.1, fired up the server, and…drum roll…

I got 1,018 compiler errors!

As a temporary workaround, because I was really desperate to get my user story changes done and into GitHub, someone (The Alum) had me just modify the other guyā€™s GUnit test in my local machine to use a parameter in keeping with 3.1 (the test didnā€™t affect anything I did).

My mentor, who was NOT PLEASED with the workaround, helped me today to get updated with 4.0.1 correctly.

In other news, I was shown how to do Git commands from within Guidewire Studio! I havenā€™t created a branch from there yet, but I managed to add, commit, and push my changes. Very exciting.

Iā€™m also happy to report that I just checked, and TWO of my user stories are now in the Release Path!

However, as of this writing, I still have MORE work to do on my role story. This is my favorite screw-up category called ā€œPam needs to learn to read.ā€ I created my role, but apparently someone felt it needed to WORK. Go figure. To be continued tomorrow…

Work Day 41: Making it official…

Iā€™ve decided that Iā€™m just not right in the head…remember that defect user story I was scoping outā€”the Penalty Payments from Hell? We were having our checkpoint this morning, and we were discussing backlog items. One person grabbed the Integration story (oh, DARN). That left my nemesis. Remind me never, ever again to jump in feet first during a lull in the meeting conversation. As no one else was leaping up and down for the payments defect story, YOURS TRULY decided to be plucky and volunteer to do it. Granted, I did indicate that I might need help, but in looking it over, I think Iā€™m going to need a BOATLOAD of help. For one thing, l have no real way to duplicate the issue on my local machine, due to having no connection for checks. I think Iā€™ll need to see if thereā€™s some way to fake a check payment going throughā€”otherwise, Iā€™ll never see whatā€™s happening with the button behavior.

Thankfully, the release date for this is March. I think my first plan of attack will be to go over this with our product owner and our BA, to make sure Iā€™m understanding what Iā€™m supposed to be fixing in the first place. I realize I probably should have come to that conclusion at 9:00 a.m. this morning, rather than at 5:00 p.m., after an entire day of trying to trace through tons of code in an attempt to understand the general process. The good news is that I think I’ve pinpointed where the roles and security get determined in the code…

One a more cheery note, I had my knitting group this evening, and Iā€™m finally done with both sleeves and body of my sweater! I just have to now join everything for the yoke.