SlideShare una empresa de Scribd logo
1 de 10
Descargar para leer sin conexión
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.)

Más contenido relacionado

La actualidad más candente

Javascript under the hood 2
Javascript under the hood 2Javascript under the hood 2
Javascript under the hood 2Thang Tran Duc
 
Android testing
Android testingAndroid testing
Android testingSean 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 GroovyAndres 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 GroovytestingAndres 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 frameworksEndranNL
 
Introduction to AndroidMock
Introduction to AndroidMockIntroduction to AndroidMock
Introduction to AndroidMockLi-Wei Cheng
 
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 - continuedPawanMM
 
Unit Testing Android Application
Unit Testing Android ApplicationUnit Testing Android Application
Unit Testing Android ApplicationHussain Mansoor
 
Groovy AST Demystified
Groovy AST DemystifiedGroovy AST Demystified
Groovy AST DemystifiedAndres Almiray
 
Working With Legacy Code
Working With Legacy CodeWorking With Legacy Code
Working With Legacy CodeAndrea Polci
 
Javascript under the hood 1
Javascript under the hood 1Javascript under the hood 1
Javascript under the hood 1Thang Tran Duc
 
Mockito with a hint of PowerMock
Mockito with a hint of PowerMockMockito with a hint of PowerMock
Mockito with a hint of PowerMockYing Zhang
 
Writing testable code
Writing testable codeWriting testable code
Writing testable codeapursani
 
Groovy AST Transformations
Groovy AST TransformationsGroovy AST Transformations
Groovy AST Transformationshendersk
 

La actualidad más candente (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
 

Destacado

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 2012Munzami Hs
 
Chapt II-Acctg Information Systems
Chapt II-Acctg Information SystemsChapt II-Acctg Information Systems
Chapt II-Acctg Information SystemsAs Sastry
 
World Heart Day 2011
World Heart Day 2011World Heart Day 2011
World Heart Day 2011As 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
 
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 YouAs 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
 

Destacado (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 a On fx jsj unit - an idea to test javascript codes with junit and javafx

Introduction to JUnit testing in OpenDaylight
Introduction to JUnit testing in OpenDaylightIntroduction to JUnit testing in OpenDaylight
Introduction to JUnit testing in OpenDaylightOpenDaylight
 
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 AgileAnton Keks
 
Whitebox testing of Spring Boot applications
Whitebox testing of Spring Boot applicationsWhitebox testing of Spring Boot applications
Whitebox testing of Spring Boot applicationsYura 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 JavaScriptHazelcast
 
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 gradleThierry 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 2010Arun Gupta
 
Developer Test - Things to Know
Developer Test - Things to KnowDeveloper Test - Things to Know
Developer Test - Things to Knowvilniusjug
 
Java Concurrency and Asynchronous
Java Concurrency and AsynchronousJava Concurrency and Asynchronous
Java Concurrency and AsynchronousLifan 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 TDDAhmed 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 2010JUG 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 2018Salvador Molina (Slv_)
 

Similar a 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
 

Más de 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_c1Shinya Mochida
 
swift-log について
swift-log についてswift-log について
swift-log についてShinya Mochida
 
Java プログラマーのための Swift 入門 #中央線Meetup
Java プログラマーのための Swift 入門 #中央線MeetupJava プログラマーのための Swift 入門 #中央線Meetup
Java プログラマーのための Swift 入門 #中央線MeetupShinya Mochida
 
swift-nio のアーキテクチャーと RxHttpClient
swift-nio のアーキテクチャーと RxHttpClientswift-nio のアーキテクチャーと RxHttpClient
swift-nio のアーキテクチャーと RxHttpClientShinya 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 (俺が)はじめての NettyShinya 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 #jjugShinya Mochida
 
Spring Boot アプリケーションの起動をほんの少し気持ちだけ速くしてみた
Spring Boot アプリケーションの起動をほんの少し気持ちだけ速くしてみたSpring Boot アプリケーションの起動をほんの少し気持ちだけ速くしてみた
Spring Boot アプリケーションの起動をほんの少し気持ちだけ速くしてみたShinya Mochida
 
Javaモジュールシステム雑なまとめ
Javaモジュールシステム雑なまとめJavaモジュールシステム雑なまとめ
Javaモジュールシステム雑なまとめ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-computationShinya 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
 

Más de 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エコシステム
 

Último

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 

Último (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

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.)