SPECIFICATION UNIT TEST BY SPEK
ANDYANG@SODA LABS
SPEK
➤ Write in kotlin
➤ Specification Testing DSL Library
➤ not assertion library (JUnit4/5)
➤ not mock library (mockito, mockk)
➤ Support style
➤ Specification (like RSpec)
➤ Gherkin
➤ Support Android & JVM
SPECIFICATION DSL
➤ describe (“description”){}
➤ context(“context”){}
➤ it(“assertion”){}
➤ skipping test
➤ prefix with x
➤ xdescribe
➤ xcontext
➤ xit
GHERKIN DSL
➤ Feature(“feature”){}
➤ Scenario(“scenario”){}
➤ Given(“arrange”){} -> arrange
➤ When(“act”){} -> act
➤ Then(“assertion”) -> assertion
➤ And(“more”) -> more
HOW TO START
➤ Step 1 extends Spek
➤ Step 2 describe your context & assertion and done.
MORE FEATURE
➤ Common DSL
➤ group {}
➤ beforeGroup {}
➤ afterGroup {}
➤ beforeEachTest -> JUnit @Before setUp function
➤ afterEachTest -> JUnit @After teatDown function
MORE FEATURE
➤ make instance unique for each test
➤ before
➤ after using delegate memoized
SAMPLE PROJECT
➤ Todo list sample
➤ kotlin
➤ koin
➤ rxjava2
➤ redux
➤ pure domain module
➤ https://github.com/bng86/ReduxTodo
“WE’RE HIRING
https://pklotcorp.mit.jobs/

More Related Content

PDF
PPTX
Practical Glusto Example
PDF
Talk on PHP Day Uruguay about Docker
PPTX
Ansible+docker (highload++2015)
PPTX
Testing Django APIs
PDF
Volker Fröhlich - How to Debug Common Agent Issues
PPT
Large Scale Log collection using LogStash & mongoDB
PDF
Enter Cookbook: refactoring under a microscope
Practical Glusto Example
Talk on PHP Day Uruguay about Docker
Ansible+docker (highload++2015)
Testing Django APIs
Volker Fröhlich - How to Debug Common Agent Issues
Large Scale Log collection using LogStash & mongoDB
Enter Cookbook: refactoring under a microscope

What's hot (20)

PDF
Up and Running with Glusto & Glusto-Tests in 5 Minutes (or less)
PDF
Tales Of The Black Knight - Keeping EverythingMe running
PPTX
Attack monitoring using ElasticSearch Logstash and Kibana
PDF
Dexador Rises
PDF
Tech Talk #4 : Multi - threading and GCD ( grand central dispatch ) in iOS - ...
PDF
Caching in Docker - the hardest thing in computer science
PDF
Configuring Syslog by Octavio
PPTX
Burp Suite Extensions
PDF
Spock Framework (Java Day BY 2015)
PDF
ContainerDayVietnam2016: Lesson Leanred on Docker 1.12 and Swarm Mode
PDF
Dropwizard
PPTX
Build, logging, and unit test tools
PDF
Jordan Hubbard Talk @ LISA
PPT
{{more}} Kibana4
PDF
Mobile Analytics mit Elasticsearch und Kibana
PDF
How to Test Asynchronous Code (v2)
ODP
Monitoring with ElasticSearch
PDF
Getting Started with PureScript
PPTX
Postgres level up
PDF
Easy access to open stack object storage
Up and Running with Glusto & Glusto-Tests in 5 Minutes (or less)
Tales Of The Black Knight - Keeping EverythingMe running
Attack monitoring using ElasticSearch Logstash and Kibana
Dexador Rises
Tech Talk #4 : Multi - threading and GCD ( grand central dispatch ) in iOS - ...
Caching in Docker - the hardest thing in computer science
Configuring Syslog by Octavio
Burp Suite Extensions
Spock Framework (Java Day BY 2015)
ContainerDayVietnam2016: Lesson Leanred on Docker 1.12 and Swarm Mode
Dropwizard
Build, logging, and unit test tools
Jordan Hubbard Talk @ LISA
{{more}} Kibana4
Mobile Analytics mit Elasticsearch und Kibana
How to Test Asynchronous Code (v2)
Monitoring with ElasticSearch
Getting Started with PureScript
Postgres level up
Easy access to open stack object storage
Ad

More from 哲偉 楊 (16)

PDF
Code kata 的自我修煉
PDF
Coding dojo
PDF
輕輕鬆鬆產生 changelog
PDF
Speed up add custom marker on google map
PDF
Jenkins for android developer at TWJUG
PDF
自己的 Jenkins 自己來 for Android developer
PDF
從開發到上線的華麗大冒險
PDF
Kotlin初體驗
PDF
Kotlin 初體驗
PDF
Unit test and ui testing with cucumber
PDF
RxJava With retrolambda
PDF
ORMLite Android
PDF
設計師合作經驗分享
PPTX
Dog point
PPTX
PPTX
Hybrid design with bootstrap
Code kata 的自我修煉
Coding dojo
輕輕鬆鬆產生 changelog
Speed up add custom marker on google map
Jenkins for android developer at TWJUG
自己的 Jenkins 自己來 for Android developer
從開發到上線的華麗大冒險
Kotlin初體驗
Kotlin 初體驗
Unit test and ui testing with cucumber
RxJava With retrolambda
ORMLite Android
設計師合作經驗分享
Dog point
Hybrid design with bootstrap
Ad

Recently uploaded (20)

PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PPTX
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PPTX
Software Engineering and software moduleing
PPTX
communication and presentation skills 01
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PDF
Soil Improvement Techniques Note - Rabbi
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PDF
Design Guidelines and solutions for Plastics parts
PPTX
Module 8- Technological and Communication Skills.pptx
PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PPTX
Amdahl’s law is explained in the above power point presentations
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
PPTX
CyberSecurity Mobile and Wireless Devices
PPTX
introduction to high performance computing
August 2025 - Top 10 Read Articles in Network Security & Its Applications
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
Software Engineering and software moduleing
communication and presentation skills 01
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
distributed database system" (DDBS) is often used to refer to both the distri...
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
Soil Improvement Techniques Note - Rabbi
Fundamentals of safety and accident prevention -final (1).pptx
Design Guidelines and solutions for Plastics parts
Module 8- Technological and Communication Skills.pptx
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
Amdahl’s law is explained in the above power point presentations
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
CyberSecurity Mobile and Wireless Devices
introduction to high performance computing

Specification unit test by Spek