DEV Community

Evan Lin
Evan Lin

Posted on • Originally published at evanlin.com on

TWJUG@LINE Conference Notes: October 21, 2020

Preface

Hello everyone, I am Evan Lin, a Technical Evangelist at LINE Taiwan. On the evening of October 21, 2020, I was very happy to invite the TWJUG community to LINE's Taipei office to host a community gathering. There were a total of four speakers this time, and the speakers from LINE were Wayne Wu from TECHFRESH, Joanna Hu and Andy Chen from the LINE Shopping team.

Event URL: KKTIX: https://twjug.kktix.cc/events/twjug202010

Opening: Introduction to LINE TECHFRESH

Every year, the LINE Taiwan engineering team recruits students from information technology-related departments or those with experience in this field to join the LINE team for long-term internships (one-year term) through the LINE TECH FRESH – Technical New Star Talent Program, allowing students to observe and learn in an international technology company.

For more information, please refer to this article: LINE TECH FRESH – Technical New Star Talent Program, Internship Experience Revealed

Each intern will be assigned to different teams and serve as a seed engineer within the team. Through guidance from internal and training projects, each participating student can understand the development process of cross-national products and the software engineering skills of large companies.

Next, various teams will share their experiences, whether as TECH FRESH interns or as hiring managers with TECH FRESH experience, sharing their project training methods and the scope of their responsibilities.

LINE Internship Experience Sharing / Wayne Wu

The second speaker was Wayne Wu, a fourth-year student from the Department of Computer Science at National Taiwan University, who is currently interning at LINE. He shared his internship experiences from July to now, a total of three months. First of all, as a student, there are often issues with uneven "responsibility allocation", "communication" difficulties, and unclear "processes" in project assignments. However, these problems are often absent when interning at LINE. Through the careful guidance of experienced mentors, and the opportunity to handle new projects after a month of internship, the speaker became more proactive and enthusiastic in learning.

At the same time, the speaker also shared that he felt the team's high demands for documentation during his internship at LINE. Clear documentation leads newcomers to quickly get started, and mentors also require students who have handled projects to try to record all learning opportunities from their experiences. Through regular internal reading clubs, the motivation and technical skills for learning are enhanced, and through frequent communication, it is ensured that team members are actively promoting projects with a consensus.

In terms of cross-national cooperation, the speaker also shared some interesting anecdotes with colleagues from Vietnam. Although they communicate through text, it also allows their language and expression skills to continuously improve.

Finally, this student also shared that he often works on a beanbag chair, which allows him to focus more on the problems at hand. The atmosphere is very free and the work is flexible, making work like another interesting learning experience.

Migrating to JUnit 5 / Joanna Hu

Next, Joanna, an engineer from LINE SHOPPING, shared her experience of migrating to JUnit 5. First, clarify a few terms:

  • JUnit Jupiter: A new way to write test casts in JUnit5.
  • JUnit Vintage: It can run test engines with JUnit3 and JUnit4 architecture syntax.
  • JUnit Platform: It is the lowest layer used to start the test framework under JVM.

Why Integrate to JUnit5

  • Highly supports IDE and build tools
  • Easy to migrate from JUnit4
  • And has related new features

JUnit5 New Features

  • Nested testing

Supports Nexted testing, which can make the testing process more systematic and can also be classified into various functions to run tests of different scales.

  • Display Name

Supports Friendly Display Name, which allows the test to display not just the name of the test when it is executed, but a more meaningful test name.

  • Parameterized tests

Repeatedly execute the same test function through different parameter inputs.

  • Support multiple runners

How to migrating to JUnit5

Next is also the focus of this presentation. If you are a JUnit4 developer, how do you migrate to JUnit5?

- Upgrade your Maven to 3.63 or above

Upgrade your Gradle to 4.6 or above

First, write some test cases using JUnit5

  • Migrate the tests of JUnit4
    • Packages that have been changed can continue to be used
  • Rewrite JUnit4 Rule tests into JUnit5 Extension
    • You can do this by changing the name, and you can also use the functions of IntelliJ IDEA to replace them

Reference Documents:

Introduction to AssertJ / Andy Chen

Next, Andy, also an engineer from LINE SHOPPING, will introduce AssertJ. Through assert, it is used to check related values or test warning messages. AssertJ has the advantage of being easier to read, and will be introduced in detail next:

Fluent Expression

Through AssertJ, it can be displayed in a more colloquial way,

assertThat(actual).isEqualTo(expected);

Enter fullscreen mode Exit fullscreen mode

In addition to being easy to read, it is also easier to express. You can also use AssertJ to reduce getters and temporary variables. You can also use collection asserting to check multiple values at once.

Better Error Description

Through AssertJ, you can have more expressions to express the correct idea, which can avoid too many individual asserts and easily have omissions.

And you can use soft assertion so that when an error occurs, it will not jump out first, and you can check many places at once.

And there are more related functions Expression Assertions, Optional Assertions are clearer and Completable Future Assertions can all be used.

Summary

  • AssertJ can more easily state and express the original meaning of the test case (semantically)
  • AssertJ can more clearly express the situation of test failure
  • Less code can have more precise expression

Reference Documents:

Event Summary

Thanks to TWJUG's enthusiastic participation, the event held at the LINE office received a very high attendance rate. LINE continues to cultivate and support the open source technology community, and will be the gold sponsor of JCConf on November 19, 2020. There will also be related booths and developers to meet and greet each other that day. Developers who love Java, see you then!

Join the "LINE Developer Official Community" official account immediately, and you can receive push notifications of the latest Meetup events or the latest news related to the developer program. ▼

"LINE Developer Official Community" Official Account ID: @line_tw_dev

About the "LINE Developer Community Program"

LINE launched the "LINE Developer Community Program" in Taiwan at the beginning of this year, and will invest long-term manpower and resources to hold developer community gatherings, recruitment days, developer conferences, etc., both internally and externally, online and offline, in Taiwan. More than 30 events have been held. Readers are welcome to continue to check back for the latest updates. For details, please see:

Top comments (0)