How Will Java 9 Impact Software Development and Quality Assurance Teams? – DZone Agile

After a three-year hiatus in Java updates, the time has finally arrived for Java 9 to hit the market with an expected release date of September 21, 2017. After multiple delays from the original expected release date of fall 2016, developers and quality assurance (QA) teams are eagerly awaiting the new Java update filled with almost 90 features ranging from modularity to private interface methods.

Java 9 claims to have improvements in memory, performance, use of hardware, documentation, graphics, and compilation. With these new improvements, it is fair to assume that many people will consider adopting Java 9 – but there are several important considerations and best practices for development teams to heed during the move to Java 9. Additionally, with all this change, testers need to be well prepared to ensure applications behave as expected on the new Java version.

The Best of What’s New

Modularity: The most compelling new capability in Java 9 is the introduction of a modular Java, also known as Project Jigsaw. One of the main benefits of modularity is easier maintainability of code. Modularity allows you to compile your code in segments, coined compiling through the “modular-path” rather than the traditional method of compiling your code through the “class-path.” This means that you are no longer trying to compile large amounts of code at once but rather pass through smaller “modules” or sections of code. You can also choose what sections of your code you want to make visible and what parts of your code you’d like to keep private. This helps build additional security within the code base.

The modularity feature has an impact on testers as well. For example, when it comes to testing these modular applications, it can be much easier. Instead of running tests on the whole project, which can be time-consuming, you can now run test cases on a particular module to ensure it is working as expected.

JShell: JShell is a command line tool that enables you to run Java statements rather than writing code in IDEs like Eclipse. Therefore, there is no need to wrap code into classes or methods when leveraging JShell. For software testing professionals trying to learn a new programming language, especially Java, JShell can be useful. The shell can make learning more about Java declarations, statements, expressions, etc., easier. Most importantly, with JShell you can type Java Statements without having to follow and confirm Java Language Specification. The following example should help.

With JShell you can print “Hello SmartBear” in JShell simply by writing System.out.println(“Hello SmartBear”).

Note that there is no need to run the standard public static void main(String[] args){} .This is similar to other shell tools that you might have used for Python.

Other Features: There are many other features included in Java 9 such as an interactive read-evaluate-print-loop, collection factory methods to avoid repetitive code, and new API improvements around the process ID. And while Java has continued to update and improve on existing features, they have also removed features that get little to no use.

Top Considerations When Moving to Java 9

The Migration Effort Involved: Whenever switching scripting languages, updating software, or changing an internal filing system, migration can be a daunting task. As users contemplate switching from an earlier Java version, or another scripting language, to Java 9, or building brand new applications using Java 9, there are several critical considerations to be mindful of. Some of these considerations include the level of effort involved in the migration, ensuring that the regression testing process is thorough and inclusive of the deprecated features in older Java versions, and performing functional and load tests to ensure that new capabilities in Java 9 function as intended.

Assessing the Level of Effort to Migrate: Before refactoring your code and splitting your code into modules, it is critical to ensure project delivery schedules are not negatively impacted. When a code is transferred from an earlier version of Java to Java 9, automatic modules will be created when migrating. These automatic modules are helpful for an initial and gradual migration; however, users should consider moving from these automatic modules to true modules once they are up and running in Java 9.

The Importance of Testing

How to Approach Regression Testing: Existing test scripts might need to be completely refactored to ensure they accurately reflect the new business logic and functionality of your application after migration to Java 9. Having QA teams involved in the development process will ensure greater agility when it comes time to fully engage in regression testing and ensure that migrated code does not break any previous functionality. Re-running testing scenarios post-migration will ensure that there are no new bugs and that any new changes to an application have not resulted in a regression or failure. While these tests can be performed manually on small projects, as the project size grows and more environments want to be tested, teams are often required to switch to an automated testing tool. Learn more about regression testing here.

How to Approach Functional and Load Testing: Many of the new capabilities in Java 9, especially the modular-path compiling method, will change how the application functions and how the various modules are integrated. Therefore, users who plan on adopting the modular-path compiling method should consider investing in automated testing processes and tools that will be able to continuously test their user interfaces and ensure the highest quality is maintained. Functional testing is important to ensure functionality of an application post-migration to Java 9 is working as expected. Additionally, it is important to get a testing tool that allows you to both create automated tests and fully automate the QA testing process. Load testing should be conducted post-migration to ensure that the system can handle what it was designed to withstand. Once the application is near complete, it is important to test whether or not modularity will affect the application’s ability to handle the demands of the market.

Next Steps

If you are looking to try out Java 9 and some of the new features before the September release date, you can download the Java SE Development Kit (JDK) Early Access build. In order to ensure the highest quality for your Java applications today and after moving to Java 9, learn more about why TestComplete is the top rated automated software testing tool by Gartner.

Browse

Article by channel:

Read more articles tagged: Agile