SlideShare a Scribd company logo
On FxJsJUnit
an idea to test JavaScript codes with JUnit
and JavaFX
Who writes this document?
● Name : mike_neck (Twitter @mike_neck)
● Jobs : No Jobs now!
  ○ If someone provide me a chance to have an
    opportunity, I will try it! So ask me!
● Technologies :
  ○   Groovy
  ○   JavaScript
  ○   Java
  ○   Erlang
● Interested in : Concurrent Programings
What's the Fx-Js-JUnit?
● An library for testing JavaScript with Type
  safe assertion.
● Applied JavaFX's WebEngine as a
  JavaScript Environment.
● Based on these ideas and environment, we
  can test for JavaScript with JUnit, most
  popular testing framework.
Usage of Fx-Js-JUnit - the sample
code. - (1) Preparation for test.

@ClassRule
public static FxJsJUnit fxJsJUnit
  = FxJsJUnit.option(CoreExtension.class)
       .address("http://www.oracle.com")
       .identifiedBy(WebTest.class)
       .get();
Usage of Fx-Js-JUnit - the sample
code. - (2) getting IF for WebEngine.

private JsJUnit jsJUnit;


@Before
public void getTester() {
    jsJUnit = fxJsJUnit.getTester();
}
Usage of Fx-Js-JUnit - the sample
code. - (3) calling JavaScript code.

@Test
public void testStringTest () {
    String result = jsJUnit.callAsString(
         "$('#input').text;"
    );
    assertThat(result, is ("Input Here!"));
}
Off course you can assert Plain Old
JavaScript Object with POJO.
@Test
public void personInitialization () {
    Person person = new Person();
    person.setName("mike");
    person.setAge(35);
    Person mike = jsJUnit.callAs(
       "new Person('mike', 35)", Person.class);
    assertThat(mike, is(person));
}
Architecture of Fx-Js-JUnit
                         4.call-function
                                      Test
   JavaFx
                         4.call-function
                     JsJUnit          Test
               5. call
   WebEngine             4.call-function
                                      Test
        1.Launch         2.Prepare 3.execute

                   JUnit
TODOs and Problems/Difficulties
● Embbed Web Servers (Static Web Server)
  /Servlet Containers (Tomcat / Jetty) /Java
  EE Containers (Glassfish) to test total
  Enterprise Application (TODO)
● Fx-Js-JUnit cannot be applied Concurrent
  Test Execution. Because JavaFX cannot be
  launched simultaneously and multiple times
  without restart JVM(. It requires modification
  of JUnit framework). (Problem/Difficulty)
   ○ to avoid this problem I'm going to develop gradle-
     fxjsjunit-plugin and Jenkins-fsjsjunit-plugin.
Thank you for your attention.
Available resources ...
● GitHub
   ○ https://github.com/mike-neck/FxJsJUnit
● Another documents
   ○ http://www.slideshare.net/mikeneck/unit-testing-
     java-script-with-javafx
      ■ (I'm sorry this document is written in Japanese.)

More Related Content

What's hot

Meta Programming in Groovy
Meta Programming in GroovyMeta Programming in Groovy
Meta Programming in Groovy
NexThoughts Technologies
 
Groovy intro
Groovy introGroovy intro
Javascript under the hood 2
Javascript under the hood 2Javascript under the hood 2
Javascript under the hood 2
Thang Tran Duc
 
Android testing
Android testingAndroid testing
Android testing
Sean Tsai
 
GTAC Boosting your Testing Productivity with Groovy
GTAC Boosting your Testing Productivity with GroovyGTAC Boosting your Testing Productivity with Groovy
GTAC Boosting your Testing Productivity with Groovy
Andres Almiray
 
Mis Conceptions About The Tiny Java
Mis Conceptions About The Tiny JavaMis Conceptions About The Tiny Java
Mis Conceptions About The Tiny JavaSultan Jokhio
 
Javaone2008 Bof 5101 Groovytesting
Javaone2008 Bof 5101 GroovytestingJavaone2008 Bof 5101 Groovytesting
Javaone2008 Bof 5101 Groovytesting
Andres Almiray
 
Mockito vs JMockit, battle of the mocking frameworks
Mockito vs JMockit, battle of the mocking frameworksMockito vs JMockit, battle of the mocking frameworks
Mockito vs JMockit, battle of the mocking frameworks
EndranNL
 
Introduction to AndroidMock
Introduction to AndroidMockIntroduction to AndroidMock
Introduction to AndroidMockLi-Wei Cheng
 
JMockit
JMockitJMockit
JMockit
Angad Rajput
 
Test Driven Development iOS에 적용해보기
Test Driven Development  iOS에 적용해보기Test Driven Development  iOS에 적용해보기
Test Driven Development iOS에 적용해보기
Bob Lee
 
Session 13 - Exception handling - continued
Session 13 - Exception handling - continuedSession 13 - Exception handling - continued
Session 13 - Exception handling - continued
PawanMM
 
Unit Testing Android Application
Unit Testing Android ApplicationUnit Testing Android Application
Unit Testing Android Application
Hussain Mansoor
 
Groovy AST Demystified
Groovy AST DemystifiedGroovy AST Demystified
Groovy AST Demystified
Andres Almiray
 
Working With Legacy Code
Working With Legacy CodeWorking With Legacy Code
Working With Legacy Code
Andrea Polci
 
Ast transformation
Ast transformationAst transformation
Ast transformation
Gagan Agrawal
 
Javascript under the hood 1
Javascript under the hood 1Javascript under the hood 1
Javascript under the hood 1
Thang Tran Duc
 
Mockito with a hint of PowerMock
Mockito with a hint of PowerMockMockito with a hint of PowerMock
Mockito with a hint of PowerMock
Ying Zhang
 
Writing testable code
Writing testable codeWriting testable code
Writing testable code
apursani
 
Groovy AST Transformations
Groovy AST TransformationsGroovy AST Transformations
Groovy AST Transformations
hendersk
 

What's hot (20)

Meta Programming in Groovy
Meta Programming in GroovyMeta Programming in Groovy
Meta Programming in Groovy
 
Groovy intro
Groovy introGroovy intro
Groovy intro
 
Javascript under the hood 2
Javascript under the hood 2Javascript under the hood 2
Javascript under the hood 2
 
Android testing
Android testingAndroid testing
Android testing
 
GTAC Boosting your Testing Productivity with Groovy
GTAC Boosting your Testing Productivity with GroovyGTAC Boosting your Testing Productivity with Groovy
GTAC Boosting your Testing Productivity with Groovy
 
Mis Conceptions About The Tiny Java
Mis Conceptions About The Tiny JavaMis Conceptions About The Tiny Java
Mis Conceptions About The Tiny Java
 
Javaone2008 Bof 5101 Groovytesting
Javaone2008 Bof 5101 GroovytestingJavaone2008 Bof 5101 Groovytesting
Javaone2008 Bof 5101 Groovytesting
 
Mockito vs JMockit, battle of the mocking frameworks
Mockito vs JMockit, battle of the mocking frameworksMockito vs JMockit, battle of the mocking frameworks
Mockito vs JMockit, battle of the mocking frameworks
 
Introduction to AndroidMock
Introduction to AndroidMockIntroduction to AndroidMock
Introduction to AndroidMock
 
JMockit
JMockitJMockit
JMockit
 
Test Driven Development iOS에 적용해보기
Test Driven Development  iOS에 적용해보기Test Driven Development  iOS에 적용해보기
Test Driven Development iOS에 적용해보기
 
Session 13 - Exception handling - continued
Session 13 - Exception handling - continuedSession 13 - Exception handling - continued
Session 13 - Exception handling - continued
 
Unit Testing Android Application
Unit Testing Android ApplicationUnit Testing Android Application
Unit Testing Android Application
 
Groovy AST Demystified
Groovy AST DemystifiedGroovy AST Demystified
Groovy AST Demystified
 
Working With Legacy Code
Working With Legacy CodeWorking With Legacy Code
Working With Legacy Code
 
Ast transformation
Ast transformationAst transformation
Ast transformation
 
Javascript under the hood 1
Javascript under the hood 1Javascript under the hood 1
Javascript under the hood 1
 
Mockito with a hint of PowerMock
Mockito with a hint of PowerMockMockito with a hint of PowerMock
Mockito with a hint of PowerMock
 
Writing testable code
Writing testable codeWriting testable code
Writing testable code
 
Groovy AST Transformations
Groovy AST TransformationsGroovy AST Transformations
Groovy AST Transformations
 

Viewers also liked

Study guidechap03
Study guidechap03Study guidechap03
Study guidechap03As Sastry
 
Kemiskinan Multidimensi
Kemiskinan MultidimensiKemiskinan Multidimensi
Kemiskinan MultidimensiMunzami Hs
 
Presentasi Biro Hukum Setda Aceh Prolega 2011 & Rencana Prolega 2012
Presentasi Biro Hukum Setda Aceh   Prolega 2011 & Rencana Prolega 2012Presentasi Biro Hukum Setda Aceh   Prolega 2011 & Rencana Prolega 2012
Presentasi Biro Hukum Setda Aceh Prolega 2011 & Rencana Prolega 2012
Munzami Hs
 
Chapt II-Acctg Information Systems
Chapt II-Acctg Information SystemsChapt II-Acctg Information Systems
Chapt II-Acctg Information Systems
As Sastry
 
World Heart Day 2011
World Heart Day 2011World Heart Day 2011
World Heart Day 2011
As Sastry
 
Acctg Information systems for PG StudentsPresentation1
Acctg Information systems for PG StudentsPresentation1Acctg Information systems for PG StudentsPresentation1
Acctg Information systems for PG StudentsPresentation1As Sastry
 
Tolak BBM atau Terima BLT?
Tolak BBM atau Terima BLT?Tolak BBM atau Terima BLT?
Tolak BBM atau Terima BLT?Munzami Hs
 
20110426
2011042620110426
20110426
Shinya Mochida
 
Aceh Butuh ''Sekolah''
Aceh Butuh ''Sekolah''Aceh Butuh ''Sekolah''
Aceh Butuh ''Sekolah''Munzami Hs
 
How Well Are You
How Well Are YouHow Well Are You
How Well Are You
As Sastry
 
World sparrows day mar 20, 2011
World sparrows day mar 20, 2011World sparrows day mar 20, 2011
World sparrows day mar 20, 2011As Sastry
 

Viewers also liked (14)

Study guidechap03
Study guidechap03Study guidechap03
Study guidechap03
 
Kemiskinan Multidimensi
Kemiskinan MultidimensiKemiskinan Multidimensi
Kemiskinan Multidimensi
 
Presentasi Biro Hukum Setda Aceh Prolega 2011 & Rencana Prolega 2012
Presentasi Biro Hukum Setda Aceh   Prolega 2011 & Rencana Prolega 2012Presentasi Biro Hukum Setda Aceh   Prolega 2011 & Rencana Prolega 2012
Presentasi Biro Hukum Setda Aceh Prolega 2011 & Rencana Prolega 2012
 
Chapt II-Acctg Information Systems
Chapt II-Acctg Information SystemsChapt II-Acctg Information Systems
Chapt II-Acctg Information Systems
 
World Heart Day 2011
World Heart Day 2011World Heart Day 2011
World Heart Day 2011
 
013
013013
013
 
Acctg Information systems for PG StudentsPresentation1
Acctg Information systems for PG StudentsPresentation1Acctg Information systems for PG StudentsPresentation1
Acctg Information systems for PG StudentsPresentation1
 
Tolak BBM atau Terima BLT?
Tolak BBM atau Terima BLT?Tolak BBM atau Terima BLT?
Tolak BBM atau Terima BLT?
 
20110426
2011042620110426
20110426
 
Aceh Butuh ''Sekolah''
Aceh Butuh ''Sekolah''Aceh Butuh ''Sekolah''
Aceh Butuh ''Sekolah''
 
How Well Are You
How Well Are YouHow Well Are You
How Well Are You
 
Ruu ap final (2010)
Ruu ap   final (2010)Ruu ap   final (2010)
Ruu ap final (2010)
 
Pemimpin STAF
Pemimpin STAFPemimpin STAF
Pemimpin STAF
 
World sparrows day mar 20, 2011
World sparrows day mar 20, 2011World sparrows day mar 20, 2011
World sparrows day mar 20, 2011
 

Similar to On fx jsj unit - an idea to test javascript codes with junit and javafx

Junit_.pptx
Junit_.pptxJunit_.pptx
Junit_.pptx
Suman Sourav
 
Junit and testNG
Junit and testNGJunit and testNG
Junit and testNG
Марія Русин
 
Introduction to JUnit testing in OpenDaylight
Introduction to JUnit testing in OpenDaylightIntroduction to JUnit testing in OpenDaylight
Introduction to JUnit testing in OpenDaylight
OpenDaylight
 
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Paul King
 
Alexey Buzdin "Maslow's Pyramid of Android Testing"
Alexey Buzdin "Maslow's Pyramid of Android Testing"Alexey Buzdin "Maslow's Pyramid of Android Testing"
Alexey Buzdin "Maslow's Pyramid of Android Testing"
IT Event
 
Java Course 6: Introduction to Agile
Java Course 6: Introduction to AgileJava Course 6: Introduction to Agile
Java Course 6: Introduction to Agile
Anton Keks
 
Groovy Testing
Groovy TestingGroovy Testing
Groovy Testing
Davide Rossi
 
Whitebox testing of Spring Boot applications
Whitebox testing of Spring Boot applicationsWhitebox testing of Spring Boot applications
Whitebox testing of Spring Boot applications
Yura Nosenko
 
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScriptThe Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
Hazelcast
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradle
Thierry Wasylczenko
 
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
Arun Gupta
 
Developer Test - Things to Know
Developer Test - Things to KnowDeveloper Test - Things to Know
Developer Test - Things to Know
vilniusjug
 
Java Concurrency and Asynchronous
Java Concurrency and AsynchronousJava Concurrency and Asynchronous
Java Concurrency and Asynchronous
Lifan Yang
 
An Introduction To Unit Testing and TDD
An Introduction To Unit Testing and TDDAn Introduction To Unit Testing and TDD
An Introduction To Unit Testing and TDD
Ahmed Ehab AbdulAziz
 
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
JUG Lausanne
 
E2E testing con nightwatch.js - Drupalcamp Spain 2018
E2E testing con nightwatch.js  - Drupalcamp Spain 2018E2E testing con nightwatch.js  - Drupalcamp Spain 2018
E2E testing con nightwatch.js - Drupalcamp Spain 2018
Salvador Molina (Slv_)
 
Spock
SpockSpock

Similar to On fx jsj unit - an idea to test javascript codes with junit and javafx (20)

Junit_.pptx
Junit_.pptxJunit_.pptx
Junit_.pptx
 
ikp321-04
ikp321-04ikp321-04
ikp321-04
 
Junit and testNG
Junit and testNGJunit and testNG
Junit and testNG
 
Lesson 2
Lesson 2Lesson 2
Lesson 2
 
Introduction to JUnit testing in OpenDaylight
Introduction to JUnit testing in OpenDaylightIntroduction to JUnit testing in OpenDaylight
Introduction to JUnit testing in OpenDaylight
 
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
 
Alexey Buzdin "Maslow's Pyramid of Android Testing"
Alexey Buzdin "Maslow's Pyramid of Android Testing"Alexey Buzdin "Maslow's Pyramid of Android Testing"
Alexey Buzdin "Maslow's Pyramid of Android Testing"
 
Jest
JestJest
Jest
 
Java Course 6: Introduction to Agile
Java Course 6: Introduction to AgileJava Course 6: Introduction to Agile
Java Course 6: Introduction to Agile
 
Groovy Testing
Groovy TestingGroovy Testing
Groovy Testing
 
Whitebox testing of Spring Boot applications
Whitebox testing of Spring Boot applicationsWhitebox testing of Spring Boot applications
Whitebox testing of Spring Boot applications
 
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScriptThe Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradle
 
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
 
Developer Test - Things to Know
Developer Test - Things to KnowDeveloper Test - Things to Know
Developer Test - Things to Know
 
Java Concurrency and Asynchronous
Java Concurrency and AsynchronousJava Concurrency and Asynchronous
Java Concurrency and Asynchronous
 
An Introduction To Unit Testing and TDD
An Introduction To Unit Testing and TDDAn Introduction To Unit Testing and TDD
An Introduction To Unit Testing and TDD
 
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
 
E2E testing con nightwatch.js - Drupalcamp Spain 2018
E2E testing con nightwatch.js  - Drupalcamp Spain 2018E2E testing con nightwatch.js  - Drupalcamp Spain 2018
E2E testing con nightwatch.js - Drupalcamp Spain 2018
 
Spock
SpockSpock
Spock
 

More from Shinya Mochida

サーバーサイド Kotlin のテストフレームワーク事情
サーバーサイド Kotlin のテストフレームワーク事情サーバーサイド Kotlin のテストフレームワーク事情
サーバーサイド Kotlin のテストフレームワーク事情
Shinya Mochida
 
IntelliJ IDEA を完全にマスターする話
IntelliJ IDEA を完全にマスターする話IntelliJ IDEA を完全にマスターする話
IntelliJ IDEA を完全にマスターする話
Shinya Mochida
 
クリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払い
クリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払いクリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払い
クリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払い
Shinya Mochida
 
jjug-ccc 2019 Spring 発表資料 Collections Framework 入門 #jjug #jjug_ccc #ccc_c1
jjug-ccc 2019 Spring 発表資料 Collections Framework 入門 #jjug #jjug_ccc #ccc_c1jjug-ccc 2019 Spring 発表資料 Collections Framework 入門 #jjug #jjug_ccc #ccc_c1
jjug-ccc 2019 Spring 発表資料 Collections Framework 入門 #jjug #jjug_ccc #ccc_c1
Shinya Mochida
 
swift-log について
swift-log についてswift-log について
swift-log について
Shinya Mochida
 
Vim 入門
Vim 入門Vim 入門
Vim 入門
Shinya Mochida
 
Java プログラマーのための Swift 入門 #中央線Meetup
Java プログラマーのための Swift 入門 #中央線MeetupJava プログラマーのための Swift 入門 #中央線Meetup
Java プログラマーのための Swift 入門 #中央線Meetup
Shinya Mochida
 
swift-nio のアーキテクチャーと RxHttpClient
swift-nio のアーキテクチャーと RxHttpClientswift-nio のアーキテクチャーと RxHttpClient
swift-nio のアーキテクチャーと RxHttpClient
Shinya Mochida
 
JJUG CCC 2018 Spring - I-7 (俺が)はじめての Netty
JJUG CCC 2018 Spring - I-7 (俺が)はじめての NettyJJUG CCC 2018 Spring - I-7 (俺が)はじめての Netty
JJUG CCC 2018 Spring - I-7 (俺が)はじめての Netty
Shinya Mochida
 
JJUG CCC 2018 Spring LT Spring Boot アプリケーションの起動を速くする 108 の Tips #jjug_ccc #jjug
JJUG CCC 2018 Spring LT Spring Boot アプリケーションの起動を速くする 108 の Tips #jjug_ccc #jjugJJUG CCC 2018 Spring LT Spring Boot アプリケーションの起動を速くする 108 の Tips #jjug_ccc #jjug
JJUG CCC 2018 Spring LT Spring Boot アプリケーションの起動を速くする 108 の Tips #jjug_ccc #jjug
Shinya Mochida
 
Spring Boot アプリケーションの起動をほんの少し気持ちだけ速くしてみた
Spring Boot アプリケーションの起動をほんの少し気持ちだけ速くしてみたSpring Boot アプリケーションの起動をほんの少し気持ちだけ速くしてみた
Spring Boot アプリケーションの起動をほんの少し気持ちだけ速くしてみた
Shinya Mochida
 
Javaモジュールシステム雑なまとめ
Javaモジュールシステム雑なまとめJavaモジュールシステム雑なまとめ
Javaモジュールシステム雑なまとめ
Shinya Mochida
 
Kotlin as an AltJS
Kotlin as an AltJSKotlin as an AltJS
Kotlin as an AltJS
Shinya Mochida
 
JavaのStreamで学ぶ遅延処理実装パターン
JavaのStreamで学ぶ遅延処理実装パターンJavaのStreamで学ぶ遅延処理実装パターン
JavaのStreamで学ぶ遅延処理実装パターン
Shinya Mochida
 
gradle2.4のルールベースモデルコンフィギュレーション
gradle2.4のルールベースモデルコンフィギュレーションgradle2.4のルールベースモデルコンフィギュレーション
gradle2.4のルールベースモデルコンフィギュレーション
Shinya Mochida
 
On stream-lazy-computation
On stream-lazy-computationOn stream-lazy-computation
On stream-lazy-computation
Shinya Mochida
 
Stream脳の作り方
Stream脳の作り方Stream脳の作り方
Stream脳の作り方
Shinya Mochida
 
Java8のstreamをダラダラまとめてみる
Java8のstreamをダラダラまとめてみるJava8のstreamをダラダラまとめてみる
Java8のstreamをダラダラまとめてみる
Shinya Mochida
 
ドラクエの金銭感覚
ドラクエの金銭感覚ドラクエの金銭感覚
ドラクエの金銭感覚
Shinya Mochida
 
30億のデバイスで走るjavaを支えるjavaエコシステム
30億のデバイスで走るjavaを支えるjavaエコシステム30億のデバイスで走るjavaを支えるjavaエコシステム
30億のデバイスで走るjavaを支えるjavaエコシステム
Shinya Mochida
 

More from Shinya Mochida (20)

サーバーサイド Kotlin のテストフレームワーク事情
サーバーサイド Kotlin のテストフレームワーク事情サーバーサイド Kotlin のテストフレームワーク事情
サーバーサイド Kotlin のテストフレームワーク事情
 
IntelliJ IDEA を完全にマスターする話
IntelliJ IDEA を完全にマスターする話IntelliJ IDEA を完全にマスターする話
IntelliJ IDEA を完全にマスターする話
 
クリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払い
クリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払いクリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払い
クリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払い
 
jjug-ccc 2019 Spring 発表資料 Collections Framework 入門 #jjug #jjug_ccc #ccc_c1
jjug-ccc 2019 Spring 発表資料 Collections Framework 入門 #jjug #jjug_ccc #ccc_c1jjug-ccc 2019 Spring 発表資料 Collections Framework 入門 #jjug #jjug_ccc #ccc_c1
jjug-ccc 2019 Spring 発表資料 Collections Framework 入門 #jjug #jjug_ccc #ccc_c1
 
swift-log について
swift-log についてswift-log について
swift-log について
 
Vim 入門
Vim 入門Vim 入門
Vim 入門
 
Java プログラマーのための Swift 入門 #中央線Meetup
Java プログラマーのための Swift 入門 #中央線MeetupJava プログラマーのための Swift 入門 #中央線Meetup
Java プログラマーのための Swift 入門 #中央線Meetup
 
swift-nio のアーキテクチャーと RxHttpClient
swift-nio のアーキテクチャーと RxHttpClientswift-nio のアーキテクチャーと RxHttpClient
swift-nio のアーキテクチャーと RxHttpClient
 
JJUG CCC 2018 Spring - I-7 (俺が)はじめての Netty
JJUG CCC 2018 Spring - I-7 (俺が)はじめての NettyJJUG CCC 2018 Spring - I-7 (俺が)はじめての Netty
JJUG CCC 2018 Spring - I-7 (俺が)はじめての Netty
 
JJUG CCC 2018 Spring LT Spring Boot アプリケーションの起動を速くする 108 の Tips #jjug_ccc #jjug
JJUG CCC 2018 Spring LT Spring Boot アプリケーションの起動を速くする 108 の Tips #jjug_ccc #jjugJJUG CCC 2018 Spring LT Spring Boot アプリケーションの起動を速くする 108 の Tips #jjug_ccc #jjug
JJUG CCC 2018 Spring LT Spring Boot アプリケーションの起動を速くする 108 の Tips #jjug_ccc #jjug
 
Spring Boot アプリケーションの起動をほんの少し気持ちだけ速くしてみた
Spring Boot アプリケーションの起動をほんの少し気持ちだけ速くしてみたSpring Boot アプリケーションの起動をほんの少し気持ちだけ速くしてみた
Spring Boot アプリケーションの起動をほんの少し気持ちだけ速くしてみた
 
Javaモジュールシステム雑なまとめ
Javaモジュールシステム雑なまとめJavaモジュールシステム雑なまとめ
Javaモジュールシステム雑なまとめ
 
Kotlin as an AltJS
Kotlin as an AltJSKotlin as an AltJS
Kotlin as an AltJS
 
JavaのStreamで学ぶ遅延処理実装パターン
JavaのStreamで学ぶ遅延処理実装パターンJavaのStreamで学ぶ遅延処理実装パターン
JavaのStreamで学ぶ遅延処理実装パターン
 
gradle2.4のルールベースモデルコンフィギュレーション
gradle2.4のルールベースモデルコンフィギュレーションgradle2.4のルールベースモデルコンフィギュレーション
gradle2.4のルールベースモデルコンフィギュレーション
 
On stream-lazy-computation
On stream-lazy-computationOn stream-lazy-computation
On stream-lazy-computation
 
Stream脳の作り方
Stream脳の作り方Stream脳の作り方
Stream脳の作り方
 
Java8のstreamをダラダラまとめてみる
Java8のstreamをダラダラまとめてみるJava8のstreamをダラダラまとめてみる
Java8のstreamをダラダラまとめてみる
 
ドラクエの金銭感覚
ドラクエの金銭感覚ドラクエの金銭感覚
ドラクエの金銭感覚
 
30億のデバイスで走るjavaを支えるjavaエコシステム
30億のデバイスで走るjavaを支えるjavaエコシステム30億のデバイスで走るjavaを支えるjavaエコシステム
30億のデバイスで走るjavaを支えるjavaエコシステム
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 

On fx jsj unit - an idea to test javascript codes with junit and javafx

  • 1. On FxJsJUnit an idea to test JavaScript codes with JUnit and JavaFX
  • 2. Who writes this document? ● Name : mike_neck (Twitter @mike_neck) ● Jobs : No Jobs now! ○ If someone provide me a chance to have an opportunity, I will try it! So ask me! ● Technologies : ○ Groovy ○ JavaScript ○ Java ○ Erlang ● Interested in : Concurrent Programings
  • 3. What's the Fx-Js-JUnit? ● An library for testing JavaScript with Type safe assertion. ● Applied JavaFX's WebEngine as a JavaScript Environment. ● Based on these ideas and environment, we can test for JavaScript with JUnit, most popular testing framework.
  • 4. Usage of Fx-Js-JUnit - the sample code. - (1) Preparation for test. @ClassRule public static FxJsJUnit fxJsJUnit = FxJsJUnit.option(CoreExtension.class) .address("http://www.oracle.com") .identifiedBy(WebTest.class) .get();
  • 5. Usage of Fx-Js-JUnit - the sample code. - (2) getting IF for WebEngine. private JsJUnit jsJUnit; @Before public void getTester() { jsJUnit = fxJsJUnit.getTester(); }
  • 6. Usage of Fx-Js-JUnit - the sample code. - (3) calling JavaScript code. @Test public void testStringTest () { String result = jsJUnit.callAsString( "$('#input').text;" ); assertThat(result, is ("Input Here!")); }
  • 7. Off course you can assert Plain Old JavaScript Object with POJO. @Test public void personInitialization () { Person person = new Person(); person.setName("mike"); person.setAge(35); Person mike = jsJUnit.callAs( "new Person('mike', 35)", Person.class); assertThat(mike, is(person)); }
  • 8. Architecture of Fx-Js-JUnit 4.call-function Test JavaFx 4.call-function JsJUnit Test 5. call WebEngine 4.call-function Test 1.Launch 2.Prepare 3.execute JUnit
  • 9. TODOs and Problems/Difficulties ● Embbed Web Servers (Static Web Server) /Servlet Containers (Tomcat / Jetty) /Java EE Containers (Glassfish) to test total Enterprise Application (TODO) ● Fx-Js-JUnit cannot be applied Concurrent Test Execution. Because JavaFX cannot be launched simultaneously and multiple times without restart JVM(. It requires modification of JUnit framework). (Problem/Difficulty) ○ to avoid this problem I'm going to develop gradle- fxjsjunit-plugin and Jenkins-fsjsjunit-plugin.
  • 10. Thank you for your attention. Available resources ... ● GitHub ○ https://github.com/mike-neck/FxJsJUnit ● Another documents ○ http://www.slideshare.net/mikeneck/unit-testing- java-script-with-javafx ■ (I'm sorry this document is written in Japanese.)