Wednesday, November 28, 2018

Which Java - since Java's future is at stake?

Many are still talking about the importance of programming in Java. Since there are many apps and systems still running on Java, the need for Java support is still in demand. Or is it?

With Oracle putting the value of Java on the line (and risking its extinction like Solaris), perhaps I need to consider the other options. Especially with Google and community creating Kotlin (as a solution to replace Java). And especially with Amazon now also addressing this concern with its own solution called Corretto (and OpenJDK).

https://aws.amazon.com/blogs/opensource/amazon-corretto-no-cost-distribution-openjdk-long-term-support/

https://kotlinlang.org/docs/reference/comparison-to-java.html

The above link is a nice short comparison of why to use Kotlin over Java. It seems we, the community of developers, always have to wait for corporate to finally release a version which makes application development easier and product performance better. So, instead of waiting for Java <next version>, I think I'm going to try out one of the solutions in this blog.

Now, if I can only get some time to play with these languages. ;-)

Thursday, November 8, 2018

Journey into SET: Creating Test Framework in Selenium

So, I'm still on my journey back into becoming a Software Test Engineer (expert) and geesh, there's a lot to catch up on.

Today, I'm looking into creating a Test Framework with Selenium.

I googled on "selenium creating test framework" to see results and learn.

Why?
First, let's answer why I'm researching this topic. I am able to create test scripts using Selenium and my test are passing. However, as I'm creating a test suite and adding more tests, I find myself using the same code for multiple @Test. I'd like to reduce the code, use wrappers around Selenium's code, and condense my @Test to be specific on focusing on the test case. This also helps with test script maintenance. For instance, if I need all of my test scripts to navigate to their corresponding page (add form -> New Form, edit form -> Form, etc). Then, I realize I need the User to click OK to a dialog just implemented before displaying any form. I don't want to have to check this code for each test script in each @Test.

YouTube(s) I watched.
https://www.youtube.com/watch?v=DO8KVe00kcU

Article(s) I read.
https://simpleprogrammer.com/creating-automated-testing-framework-selenium/
Not very useful, unless going to author's course.
https://www.testingexcellence.com/develop-test-automation-framework-scratch/
I like the breakdown on this author's GitHub and see it's practical use. So, I decided to implement this same framework.

Pattern Insights
Since I'm using the PageObject pattern, this was very helpful to know.
https://github.com/SeleniumHQ/selenium/wiki/PageFactory



Monday, November 5, 2018

Software Testing article on 5 ways AI will change software testing

Article for today's reading...
https://techbeacon.com/5-ways-ai-will-change-software-testing

And here's an outstanding source of blogs related...
http://blog.testim.io/

It's important to try to keep up and not get discouraged at the pace of technology. :)

Jupyter Notebooks - what is it?

I stumbled upon this article and became very curious as to what a Jupyter notebook is.


Main website



Online Tutorials

Seems pretty cool for people interested in Data Science and crunching data especially using Python (or iPython). So, I decided to watch some YouTube videos to learn a little more.



Friday, November 2, 2018

Selenium Firefox - use common functions like getButton(buttonText)

Selenium Experts recommend that those who use the tool and implement it to test their applications (like me) should create wrappers specific to their application for the general code snippets frequently used. This is a long way of saying that we need to create common functions used by many Test methods.

For example, I need a common function that clicks a button given the button text. I don't want to have to keep writing this long code snippet:

(new WebDriverWait(driver, waitSeconds)).until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(CssFormButtonBegin+buttonText+CssFormButtonEnd))).click();

Instead, I would like to use a common function like:

public void clickButton(String buttonText) {
  getButton(String buttonText);
}

public void getButton(String buttonText) {
// code that gets the WebElement of button type in CssSelector
// cssDoesNotWork = "button:contains('buttonText')"
// cssWorks = "form.className button#buttonId"
// or
// cssButtons = "form.className button"; // and loop through button list to find exact button by buttonText
}

Note that I use the CssSelector instead of the XPath to get the button element.

Useful Reference