This talk describes about the history of testing framework in Ruby.
Ruby 2.2 bundles two testing frameworks. They are minitest and test-unit. Do you know why two testing frameworks are bundled? Do you know that test-unit was bundled and then removed from Ruby distribution? If you can't answer these questions and you're interested in testing framework, this talk will help you.
This talk describes about the history of bundled testing framework in Ruby and some major testing frameworks for Ruby in chronological order.
Big Data & Cloud | Cloud Storage Simplified | Adrian ColeJAX London
2011-11-01 | 04:20 PM - 05:10 PM
Key/value stores are the most common storage offerings in the cloud today. We'll introduce storage concepts and differences between cloud storage providers including Amazon S3, Rackspace Cloud Files & Microsoft Azure Blob Service. We'll demonstrate how jclouds BlobStore helps Java and Clojure developers avoid lock-in and increase testability without restricting access to provider-specific features
Java Tech & Tools | Grails in the Java Enterprise | Peter LedbrookJAX London
This document discusses how to integrate Grails applications with various enterprise systems and processes. It covers integrating Grails with build tools like Ant and Maven, managing dependencies, connecting to legacy databases, deploying applications, and integrating with Spring frameworks for messaging, web services, and other enterprise features. Grails can work with many external systems through plugins, custom ORM mappings, and by treating Grails as a Spring application. This allows Grails applications to fit into a variety of enterprise environments and development processes.
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...JAX London
Adrian Cole is the founder and chief evangelist of Cloudsoft. He discusses moving big data in and out of the cloud using jclouds, an open source multi-cloud library. jclouds provides portable APIs to work with various cloud services like blob storage, compute, and load balancing across different providers. Adrian highlights case studies and strategies for optimizing large data transfers to blob storage using techniques like multi-part uploads, slicing payloads, and parallel upload strategies. The talk focuses on improving upload speeds and integrating jclouds with other systems like Hadoop HDFS.
Slides for JJUG(Japan Java User Group) 2009 Fall BOF.
Talking about groovy history, new features in Groovy 1.6,1.7.
Especially focused on AST Transformations.
Big Data & Cloud | Cloud Storage Simplified | Adrian ColeJAX London
2011-11-01 | 04:20 PM - 05:10 PM
Key/value stores are the most common storage offerings in the cloud today. We'll introduce storage concepts and differences between cloud storage providers including Amazon S3, Rackspace Cloud Files & Microsoft Azure Blob Service. We'll demonstrate how jclouds BlobStore helps Java and Clojure developers avoid lock-in and increase testability without restricting access to provider-specific features
Java Tech & Tools | Grails in the Java Enterprise | Peter LedbrookJAX London
This document discusses how to integrate Grails applications with various enterprise systems and processes. It covers integrating Grails with build tools like Ant and Maven, managing dependencies, connecting to legacy databases, deploying applications, and integrating with Spring frameworks for messaging, web services, and other enterprise features. Grails can work with many external systems through plugins, custom ORM mappings, and by treating Grails as a Spring application. This allows Grails applications to fit into a variety of enterprise environments and development processes.
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...JAX London
Adrian Cole is the founder and chief evangelist of Cloudsoft. He discusses moving big data in and out of the cloud using jclouds, an open source multi-cloud library. jclouds provides portable APIs to work with various cloud services like blob storage, compute, and load balancing across different providers. Adrian highlights case studies and strategies for optimizing large data transfers to blob storage using techniques like multi-part uploads, slicing payloads, and parallel upload strategies. The talk focuses on improving upload speeds and integrating jclouds with other systems like Hadoop HDFS.
Slides for JJUG(Japan Java User Group) 2009 Fall BOF.
Talking about groovy history, new features in Groovy 1.6,1.7.
Especially focused on AST Transformations.
Java 9 and the impact on Maven Projects (Devoxx 2016)Robert Scholte
This is the Tools in Action version of the orginal "Java 9 and the impact on Maven Projects" presentation. It uses an old example project from the Maven by Example book, but it shows very well the issues you can hit while migrating.
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...Peter Pilgrim
In this session, we introduce the Java developer to the Arquillian framework, Gradle and the Enterprise container technologies in Java EE 7. As a lucrative bonus we will cover building EJB and Java EE 7 tests applications with Gradle, the latest and greatest build framework for the Java platform, which improves on Apache Maven. The Java EE specification full contains three different containers, namely the Web, the EJB and the CDI containers. All of them can be reached using the Arquillian Framework, and this means there is now one general testing framework, which developers should learn as part of their professional duties. The session will cover writing meaningful tests for CDI, EJB and JAX-RS. Along the way, we will introduce new features of EJB 3.2, CDI 1.1 and RESTful Services. GlassFish Embedded Container 4.0 will be demonstrated.
Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...telestax
This document summarizes a presentation about testing SIP applications using Arquillian and SipUnit. It discusses the Arquillian extension for SipServlets which allows testing SIP applications within Tomcat containers. It also discusses SipUnit which provides a test environment for unit testing SIP applications using JUnit and abstracting SIP message handling. Both projects aim to simplify testing of SIP applications.
Gradle build tool that rocks with DSL JavaOne India 4th May 2012Rajmahendra Hegde
For the long time, we have used various build tools to package applications for new software releases or applying patches to existing applications etc. dependency management, version controlling, scalability, flexibility, single-multiple projects sup portability are some of the key areas that drove the selection of a build tool, This session focuses on Gradle as a successful build tool and looks into all the above areas and uses Groovy as a DSL. We will also look into how easy it is to use Gradle as compared to other open source build tools.
Photos: https://plus.google.com/u/0/photos/105295086916869617504/albums/5739617166453582993
Gradle build tool that rocks with DSL By Rajmahendra Hegde at JavaOne Hyderabad, India on 4th May 2012
GlassFish V3 uses the OSGi module framework and service-oriented architecture to provide a highly modular and extensible application server. Key features include modular containers that can be started on demand, integration with OSGi bundles, and a service layer that allows flexible replacement of components. The modular design allows GlassFish V3 to be customized for different deployment scenarios and integrated with additional technologies through OSGi bundles.
Thread dumps provide snapshots of a Java application's threads and their states. When a slowdown occurs, get multiple thread dumps over time to analyze thread activity and identify potential issues like:
1) Lock contention between threads waiting to enter synchronized methods or blocks.
2) Deadlocks from circular wait conditions that can hang applications.
3) Threads waiting for I/O responses from databases or networks.
4) High CPU usage by specific threads as shown through monitoring tools.
Analyzing thread dumps helps locate performance bottlenecks and fix synchronization, resource contention, or inefficient code issues degrading application speed.
A quick introduction about everything that's new in Java 11. Includes API changes, language changes and new tools in the JDK.
Demo's for this presentation can be found here: https://github.com/MichelSchudel/java11demo
The document discusses various techniques for testing Groovy and Java code using Groovy's built-in testing framework and mocking capabilities. It covers unit testing with GroovyTestCase, testing exceptions, and different approaches for mocking collaborators including using mockFor/stubFor, categories, ExpandoMetaClass, and maps. It also addresses integration testing Grails actions. The conclusion compares techniques for mocking Groovy versus Java classes and mentions emerging frameworks like Gmock.
The document discusses setting up high availability for PostgreSQL 9.0 including streaming replication between a master and slave, configuration of the master and slave, using Corosync for clustering, backups, monitoring, and automation with Puppet. It provides an overview of the environment and goals, as well as details on specific components like the Corosync configuration, custom OCF resource, and monitoring tools.
DevDay 2016: Dave Farley - Acceptance testing for continuous deliveryDevDay Dresden
Writing and maintaining a suite acceptance tests that can give you a high level of confidence in the behaviour and configuration of your system is a complex task. In this talk Dave will describe approaches to acceptance testing that allow teams to: work quickly and effectively; build excellent functional coverage for complex enterprise-scale systems; manage and maintain those tests in the face of change, and of evolution in both the codebase and the understanding of the business problem.
This answered the following questions, and more: How do you fail fast? How do you make your testing scalable? How do you isolate test cases from one-another? How do you maintain a working body of tests when you radically change the interface to your system?
The talk is introduction to OSGi specification and its implementations. It summarizes corner stones of OSGi (bundles, services, components) and describes a technical background of OSGi implementations on a simple example.
OSGi has gained popularity over the last two years. The platform has some very interesting features like versioning, dynamic updates and it's service oriented nature. These characteristics however come with a price. A firm understanding of how and why OSGi works how it works, is a necessity if you plan on getting into OSGi.
This talk will start with some basic principals on the java platform and will gradually move towards the OSGi infrastructure explaining the OSGi fundamentals. The following topics will be covered:
* Classloading in OSGi
* Lifecycle management of OSGi bundles
* OSGi Service, the service registry and service composition models
Afterwards, we will explain the generally accepted best practices and OSGi design patterns.
Процесс разработки не начинается и не заканчивается на написании кода программного продукта. Мы пишем документацию, придумываем, как это всё оттестировать, и заботимся о том, чтобы доступность приложения была на высоком уровне.
Мы все делаем привычные вещи привычным для нас способом. Порой выполняя много ручной и неэффективной работы. Но что, если есть другой, радикальный подход. Можно ли формализовать свою деятельность и переложить её в код? Какие практики и инструменты для этого использовать?
В докладе будет представлен личный опыт автора по автоматизации различных элементов разработки ПО.
Workshop: Know Before You Push 'Go': Using the Beaker Acceptance Test Framewo...Puppet
This document provides an overview of testing Puppet modules using Beaker and related tools. It demonstrates generating a test Puppet module, installing necessary tools like Bundler and the Puppet module skeleton, and running the initial tests. The document recommends further resources for learning more about Beaker and testing Puppet code.
This document discusses how to test enterprise Java applications. It recommends that unit tests cover 80% of code to test small pieces of code and give confidence to make changes. Integration tests cover 15% of code to test collaboration between components like databases and servers. Acceptance tests cover the remaining 5% by testing customer requirements through concrete examples and user stories. The document provides examples of testing frameworks for different layers, including JS TestDriver and Sinon.js for client-side tests, JUnit and Mockito for server-side tests, and DBUnit and Arquillian for persistence tests. It emphasizes the importance of continuous integration to run tests automatically and ensure quality.
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)Robert Scholte
The document discusses the impact of Java 9 on Maven projects and provides strategies for Maven and plugins to support Java 9. It outlines changes in Java 9 like the module system and new JAR format that Maven must accommodate. It recommends verifying that plugins work with Java 9 and do not use internal APIs or have duplicate packages. Maven plugins may need to select the module path for compilation in some cases.
On-Demand Image Resizing Extended - External Meet-upJonathan Lee
From part of the monolith to containerized micro-service.
Slides from my presentation at DockerCon 2017 on our migration from an in-house image resizing solution in PHP / Imagemagick to leveraging Docker and an open source third party solution.
http://thumbor.org/
https://www.docker.com/
https://docs.docker.com/engine/swarm/
Ensuring OpenStack Version up Compatibility for CloudOpen Japan 2013-05-31Masayuki Igawa
These slides for CloudOpen Japan 2013 (05-31).
http://linuxconcloudopenjapan2013.sched.org/event/b0994396a7b878793f22cc4a0c5b27b7
And, you can download the same at http://events.linuxfoundation.jp/events/cloudopen-japan/program/presentations .
Kubernetes your tests! automation with docker on google cloud platformLivePerson
Arik Lerner, Automation Team Leader, and Waseem Hamshawi, Automation Infra Developer, present how to build a large scale automated testing platform by leveraging containers orchestration over GCP, with the ability to scale out and provide fast feedback while maintaining a highly reliable test infrastructure.
The presentation includes new approach of managing a scalable testing platform of distributed automated tests with Kubernetes and Docker over Google Cloud Platform.
Topics:
• GCP and Kubernetes introduction for automated testing
• Traditional Selenium Grid vs Selenium Standalone with Kubernetes and Docker for Web and Mobile tests
• Distributed and containerized testing environment over container cluster - different use cases
Ephemerals - "Short-lived Testing Endpoints". An Open Source by LivePerson which makes automation testing at large scale like a "Walk in the park".
Heavenly hell – automated tests at scale wojciech seligaAtlassian
The document summarizes Atlassian's journey to improve their automated test suite over 2.5 years. They had over 20,000 slow and fragile tests that resulted in dispirited developers accepting failures as normal. Through efforts like restructuring tests, parallelizing execution, removing flaky tests, and splitting the codebase into modules, they were able to reduce build times from over 2 hours to under 1 hour and make passes the norm. Continuous measurement, removing technical debt, and prioritizing test performance were key to their success in improving development feedback loops.
Java 9 and the impact on Maven Projects (Devoxx 2016)Robert Scholte
This is the Tools in Action version of the orginal "Java 9 and the impact on Maven Projects" presentation. It uses an old example project from the Maven by Example book, but it shows very well the issues you can hit while migrating.
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...Peter Pilgrim
In this session, we introduce the Java developer to the Arquillian framework, Gradle and the Enterprise container technologies in Java EE 7. As a lucrative bonus we will cover building EJB and Java EE 7 tests applications with Gradle, the latest and greatest build framework for the Java platform, which improves on Apache Maven. The Java EE specification full contains three different containers, namely the Web, the EJB and the CDI containers. All of them can be reached using the Arquillian Framework, and this means there is now one general testing framework, which developers should learn as part of their professional duties. The session will cover writing meaningful tests for CDI, EJB and JAX-RS. Along the way, we will introduce new features of EJB 3.2, CDI 1.1 and RESTful Services. GlassFish Embedded Container 4.0 will be demonstrated.
Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...telestax
This document summarizes a presentation about testing SIP applications using Arquillian and SipUnit. It discusses the Arquillian extension for SipServlets which allows testing SIP applications within Tomcat containers. It also discusses SipUnit which provides a test environment for unit testing SIP applications using JUnit and abstracting SIP message handling. Both projects aim to simplify testing of SIP applications.
Gradle build tool that rocks with DSL JavaOne India 4th May 2012Rajmahendra Hegde
For the long time, we have used various build tools to package applications for new software releases or applying patches to existing applications etc. dependency management, version controlling, scalability, flexibility, single-multiple projects sup portability are some of the key areas that drove the selection of a build tool, This session focuses on Gradle as a successful build tool and looks into all the above areas and uses Groovy as a DSL. We will also look into how easy it is to use Gradle as compared to other open source build tools.
Photos: https://plus.google.com/u/0/photos/105295086916869617504/albums/5739617166453582993
Gradle build tool that rocks with DSL By Rajmahendra Hegde at JavaOne Hyderabad, India on 4th May 2012
GlassFish V3 uses the OSGi module framework and service-oriented architecture to provide a highly modular and extensible application server. Key features include modular containers that can be started on demand, integration with OSGi bundles, and a service layer that allows flexible replacement of components. The modular design allows GlassFish V3 to be customized for different deployment scenarios and integrated with additional technologies through OSGi bundles.
Thread dumps provide snapshots of a Java application's threads and their states. When a slowdown occurs, get multiple thread dumps over time to analyze thread activity and identify potential issues like:
1) Lock contention between threads waiting to enter synchronized methods or blocks.
2) Deadlocks from circular wait conditions that can hang applications.
3) Threads waiting for I/O responses from databases or networks.
4) High CPU usage by specific threads as shown through monitoring tools.
Analyzing thread dumps helps locate performance bottlenecks and fix synchronization, resource contention, or inefficient code issues degrading application speed.
A quick introduction about everything that's new in Java 11. Includes API changes, language changes and new tools in the JDK.
Demo's for this presentation can be found here: https://github.com/MichelSchudel/java11demo
The document discusses various techniques for testing Groovy and Java code using Groovy's built-in testing framework and mocking capabilities. It covers unit testing with GroovyTestCase, testing exceptions, and different approaches for mocking collaborators including using mockFor/stubFor, categories, ExpandoMetaClass, and maps. It also addresses integration testing Grails actions. The conclusion compares techniques for mocking Groovy versus Java classes and mentions emerging frameworks like Gmock.
The document discusses setting up high availability for PostgreSQL 9.0 including streaming replication between a master and slave, configuration of the master and slave, using Corosync for clustering, backups, monitoring, and automation with Puppet. It provides an overview of the environment and goals, as well as details on specific components like the Corosync configuration, custom OCF resource, and monitoring tools.
DevDay 2016: Dave Farley - Acceptance testing for continuous deliveryDevDay Dresden
Writing and maintaining a suite acceptance tests that can give you a high level of confidence in the behaviour and configuration of your system is a complex task. In this talk Dave will describe approaches to acceptance testing that allow teams to: work quickly and effectively; build excellent functional coverage for complex enterprise-scale systems; manage and maintain those tests in the face of change, and of evolution in both the codebase and the understanding of the business problem.
This answered the following questions, and more: How do you fail fast? How do you make your testing scalable? How do you isolate test cases from one-another? How do you maintain a working body of tests when you radically change the interface to your system?
The talk is introduction to OSGi specification and its implementations. It summarizes corner stones of OSGi (bundles, services, components) and describes a technical background of OSGi implementations on a simple example.
OSGi has gained popularity over the last two years. The platform has some very interesting features like versioning, dynamic updates and it's service oriented nature. These characteristics however come with a price. A firm understanding of how and why OSGi works how it works, is a necessity if you plan on getting into OSGi.
This talk will start with some basic principals on the java platform and will gradually move towards the OSGi infrastructure explaining the OSGi fundamentals. The following topics will be covered:
* Classloading in OSGi
* Lifecycle management of OSGi bundles
* OSGi Service, the service registry and service composition models
Afterwards, we will explain the generally accepted best practices and OSGi design patterns.
Процесс разработки не начинается и не заканчивается на написании кода программного продукта. Мы пишем документацию, придумываем, как это всё оттестировать, и заботимся о том, чтобы доступность приложения была на высоком уровне.
Мы все делаем привычные вещи привычным для нас способом. Порой выполняя много ручной и неэффективной работы. Но что, если есть другой, радикальный подход. Можно ли формализовать свою деятельность и переложить её в код? Какие практики и инструменты для этого использовать?
В докладе будет представлен личный опыт автора по автоматизации различных элементов разработки ПО.
Workshop: Know Before You Push 'Go': Using the Beaker Acceptance Test Framewo...Puppet
This document provides an overview of testing Puppet modules using Beaker and related tools. It demonstrates generating a test Puppet module, installing necessary tools like Bundler and the Puppet module skeleton, and running the initial tests. The document recommends further resources for learning more about Beaker and testing Puppet code.
This document discusses how to test enterprise Java applications. It recommends that unit tests cover 80% of code to test small pieces of code and give confidence to make changes. Integration tests cover 15% of code to test collaboration between components like databases and servers. Acceptance tests cover the remaining 5% by testing customer requirements through concrete examples and user stories. The document provides examples of testing frameworks for different layers, including JS TestDriver and Sinon.js for client-side tests, JUnit and Mockito for server-side tests, and DBUnit and Arquillian for persistence tests. It emphasizes the importance of continuous integration to run tests automatically and ensure quality.
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)Robert Scholte
The document discusses the impact of Java 9 on Maven projects and provides strategies for Maven and plugins to support Java 9. It outlines changes in Java 9 like the module system and new JAR format that Maven must accommodate. It recommends verifying that plugins work with Java 9 and do not use internal APIs or have duplicate packages. Maven plugins may need to select the module path for compilation in some cases.
On-Demand Image Resizing Extended - External Meet-upJonathan Lee
From part of the monolith to containerized micro-service.
Slides from my presentation at DockerCon 2017 on our migration from an in-house image resizing solution in PHP / Imagemagick to leveraging Docker and an open source third party solution.
http://thumbor.org/
https://www.docker.com/
https://docs.docker.com/engine/swarm/
Ensuring OpenStack Version up Compatibility for CloudOpen Japan 2013-05-31Masayuki Igawa
These slides for CloudOpen Japan 2013 (05-31).
http://linuxconcloudopenjapan2013.sched.org/event/b0994396a7b878793f22cc4a0c5b27b7
And, you can download the same at http://events.linuxfoundation.jp/events/cloudopen-japan/program/presentations .
Kubernetes your tests! automation with docker on google cloud platformLivePerson
Arik Lerner, Automation Team Leader, and Waseem Hamshawi, Automation Infra Developer, present how to build a large scale automated testing platform by leveraging containers orchestration over GCP, with the ability to scale out and provide fast feedback while maintaining a highly reliable test infrastructure.
The presentation includes new approach of managing a scalable testing platform of distributed automated tests with Kubernetes and Docker over Google Cloud Platform.
Topics:
• GCP and Kubernetes introduction for automated testing
• Traditional Selenium Grid vs Selenium Standalone with Kubernetes and Docker for Web and Mobile tests
• Distributed and containerized testing environment over container cluster - different use cases
Ephemerals - "Short-lived Testing Endpoints". An Open Source by LivePerson which makes automation testing at large scale like a "Walk in the park".
Heavenly hell – automated tests at scale wojciech seligaAtlassian
The document summarizes Atlassian's journey to improve their automated test suite over 2.5 years. They had over 20,000 slow and fragile tests that resulted in dispirited developers accepting failures as normal. Through efforts like restructuring tests, parallelizing execution, removing flaky tests, and splitting the codebase into modules, they were able to reduce build times from over 2 hours to under 1 hour and make passes the norm. Continuous measurement, removing technical debt, and prioritizing test performance were key to their success in improving development feedback loops.
QUICK TEST PROFESSIONAL 8.2
Mercury Quick Test Professional 8.2 provides the industry’s best solution for functional test and regression test automation - addressing every major software application and environment
Transforming the Ceph Integration Tests with OpenStack Ceph Community
This document discusses transforming Ceph tests to use OpenStack. It describes running unit tests locally but running integration tests on OpenStack instances. Developers can now run integration tests on their own OpenStack tenant without waiting for resources. Specifying resources for the OpenStack machines makes the tests more self-service. Future improvements include better multi-cloud support and making archival and setup more convenient.
The document discusses the strategy for building and testing the programming language Hiroshi. It covers:
1. The Ruby Core team which maintains the language and includes over 80 volunteers.
2. The testing strategy for Ruby which involves testing at different levels from the interpreter to libraries. Extensive tests are run on Linux, Windows and macOS.
3. The CI environments used for Ruby development including GitHub Actions, Travis CI and AppVeyor, as well as internal VM clusters. Test results are collected on Ruby CI and discussed on Slack.
This talk describes three Ruby usages:
* Implementing high-level interface by Ruby.
* Using Ruby as a glue language.
* Embedding Ruby into a C program for flexibility.
All of them have pros and cons. They are trade-off. If a case can
ignore cons, we will have pros for the case.
Most of Rubyists implement their Ruby applications only by Ruby. This
talk shows another options to use Ruby as your convenient tool. If you
know another options and trade-offs of them, you will implement your
Ruby applications more effectively.
This talk uses Droonga, a distributed full-text search engine, as a
sample application to describe these Ruby usages. Droonga uses these
three Ruby usages.
Containerised Testing at Demonware : PyCon Ireland 2016Thomas Shaw
Thomas and James from Demonware discussed their company's evolution to using containers for testing. They started with "fat containers" containing all services, then separated services into containers defined in YAML files. Now they use Docker Swarm to run tests in scalable services across a cluster, addressing issues like limited resources and test parallelization. The talk provided an example of optimizing a testing pipeline through containerization.
Level Up Your Integration Testing With TestcontainersVMware Tanzu
The document discusses Testcontainers, a Java library that makes it easy to create lightweight, disposable Docker containers to support integration testing. Testcontainers allows developers to start containers for databases, browsers, and other services via simple annotations and eliminates the need to manage complex Docker configurations and container lifecycles manually. It integrates with JUnit and handles starting a new container before each test and cleaning it up afterwards, improving testing fidelity by mimicking production environments.
How to develop the Standard Libraries of Ruby?Hiroshi SHIBATA
I maintain the RubyGems, Bundler and the standard libraries of the Ruby language. So, I've been extract many of the standard libraries to default gems and GitHub at Ruby 3.0. But the some of libraries still remains in only Ruby repository. I will describe these situation.
Parallelizing CI using Docker Swarm-ModeAkihiro Suda
Presented at Open Source Summit Japan (http://sched.co/AOmo)
- - -
Slowness of CI is a critical issue in software development, because it discourages engineers from writing tests, and hence deteriorates the quality of the product.
In this presentation, Akihiro Suda will talk about how to accelerate CI by executing test functions in parallel, across a Docker Swarm-mode cluster.
One of the major challenges was the nonuniformity of the makespan. e.g. some chunk of test functions can take 30 minutes, some chunk can take just 10 seconds...
So, he mitigates such a nonuniformity by randomizing the composition of chunks of test functions.
As a result, for example, the integration test of Docker itself that had taken more than 80 minutes can be finished in 4 minutes, with 10 Docker Swarm-mode nodes.
This hack can be easily applied to CI of other software as well.
Tempest provides scenario tests that test integration between multiple OpenStack services by executing sequences of operations. Current scenario tests cover operations like boot instances, attach volumes, manage snapshots and check network connectivity. Running scenario tests helps operators validate their cloud and developers check for regressions. While useful, scenario tests have issues like needing more test coverage, complex configuration, and difficulty analyzing failures. The future includes making scenario tests easier to use without command line skills and more flexible in specifying test environments.
The Throwdown will begin shortly and feature presentations from Aaron Patterson on the history of MRI Ruby and Nick Sieger and Brian Ford on the histories of JRuby and Rubinius respectively. The agenda will cover introductions and histories, ecosystems, tooling, concurrency, Windows support, deployment strategies and a Q&A session. Key differences discussed include MRI's C extension support, JRuby's access to Java libraries, and Rubinius' custom VM and JIT compiler.
Here are the basic steps to download the latest version of DevStack:
1. Install Git:
- On Ubuntu/Debian: `sudo apt-get install git`
- On CentOS/RHEL: `sudo yum install git`
2. Clone the DevStack repository:
`git clone https://git.openstack.org/openstack-dev/devstack`
3. Change to the DevStack directory:
`cd devstack`
4. Checkout the latest stable branch (e.g. stable/ussuri):
`git checkout stable/ussuri`
5. Download the latest code:
`git pull`
This will download the latest version
Talk given at OpenResty Con 2017 in Beijing.
Kong (https://getkong.org) is a widely-adopted open source API Gateway built with OpenResty. It aims at helping secure, manage, and extend microservices-based architectures with minimal effort from the user, while ensuring platform agnosticism.
In this talk, we will explore the challenges we encountered developing such an OpenResty application, and how we overcame many of them by way of libraries and contributions back to the OpenResty community. We will cover topics such as clustering OpenResty nodes, inter-workers communication, DNS resolution, typical pitfalls OpenResty developers should avoid, and much more.
The document discusses the authors' experience writing automated regression tests for a web application using Cucumber, Watir, and other tools. They started with Watir but found it had limitations, so tried Webrat and Selenium instead, but debugging was difficult in Selenium. They switched back to Watir which allowed direct DOM manipulation and running tests in parallel browsers. Cucumber was used as a common language across the automated tests. Writing tests helped them better understand the application and find bugs.
Tempest is the OpenStack integration test suite. It uses unittest and nosetest frameworks to run API calls against OpenStack services like Nova, Glance, Keystone, etc. and validate the responses. Tempest tests include smoke, positive, negative, stress and white box tests. It has a modular structure with common, services, and tests directories. Tempest plays an important role in OpenStack continuous integration by running on proposed code changes to check for regressions.
Selenium has an industry reputation of being a “flaky” tool where individual tests pass, then fail—sometimes with no production changes at all. Such flakiness in your test suites can be extremely difficult, time consuming, and frustrating to debug. The vast majority of these issues stem from using either bad locators or bad wait conditions. But both of these root causes can be addressed by implementing the right framework for your Selenium tests. Craig Schwarzwald shares the most important concepts in creating such a Selenium framework. He has proved that using a framework containing a Base Page Object that wraps core Selenium methods will produce a number of significant benefits to Selenium suites. Explore how having a single place to perform logging and error handling of core Selenium functions—as well as implementing easy uses for explicit waits—will solve nearly all Selenium flakiness issues in your test suites. Plus, you benefit from making your tests easy to create, read, and maintain over the long term.
Escaping Automated Test Hell - One Year LaterWojciech Seliga
Slides from my talk at 33rd Degree 2013 Conference in Warsaw.
More than year ago we faced the fact that we are hitting the wall with our large scale automated testing in Atlassian JIRA. We analysed the problems and possible solutions and shared them with community at 33rd Degree in 2012. Since then we've implemented a lot of our ideas and come up with new, learnt new quite unexpected things and got rid of Selenium 1 completely.
This session shows the learnings from our journey – escaping from Test Hell – back to the normality.
If you are interested to hear what problems you can (and probably will) face if you have thousands of automated tests on on levels of abstractions (functional, integration, unit, UI, performance) and what solutions can be applied to remedy them – this presentation is for you.
This document discusses plans for standard Ruby libraries and gemification. It introduces the classifications of standard, default, and bundled libraries. It outlines pros and cons of extracting libraries to gems. The author details their work transferring reserved gems on Rubygems and overriding standard libraries. They propose promoting all standard libraries to default gems and removing Rubygems dependencies from default gems for Ruby 3.0 to reduce package size. Integrating Bundler into the Ruby core by Ruby 3.0 is also discussed.
Similar to The history of testing framework in Ruby (20)
RubyKaigi 2022 - Fast data processing with Ruby and Apache ArrowKouhei Sutou
I introduced Ruby and Apache Arrow integration including the "super fast large data interchange and processing" Apache Arrow feature at RubyKaigi Takeout 2021.
This talk introduces how we can use the "super fast large data interchange and processing" Apache Arrow feature in Ruby. Here are some use cases:
* Fast data retrieval (fast pluck) from DB such as MySQL and PostgreSQL for batch processes in a Ruby on Rails application
* Fast data interchange with JavaScript for dynamic visualization in a Ruby on Rails application
* Fast OLAP with in-process DB such as DuckDB and Apache Arrow DataFusion in a Ruby on Rails application or irb session
RubyKaigi Takeout 2021 - Red Arrow - Ruby and Apache ArrowKouhei Sutou
To use Ruby for data processing widely, Apache Arrow support is important. We can do the followings with Apache Arrow:
* Super fast large data interchange and processing
* Reading/writing data in several famous formats such as CSV and Apache Parquet
* Reading/writing partitioned large data on cloud storage such as Amazon S3
This talk describes the followings:
* What is Apache Arrow
* How to use Apache Arrow with Ruby
* How to integrate with Ruby 3.0 features such as MemoryView and Ractor
Apache Arrow 1.0 - A cross-language development platform for in-memory dataKouhei Sutou
Apache Arrow is a cross-language development platform for in-memory data. You can use Apache Arrow to process large data effectively in Python and other languages such as R. Apache Arrow is the future of data processing. Apache Arrow 1.0, the first major version, was released at 2020-07-24. It's a good time to know Apache Arrow and start using it.
Apache Arrow - A cross-language development platform for in-memory dataKouhei Sutou
Apache Arrow is the future for data processing systems. This talk describes how to solve data sharing overhead in data processing system such as Spark and PySpark. This talk also describes how to accelerate computation against your large data by Apache Arrow.
csv, one of the standard libraries, in Ruby 2.6 has many improvements:
* Default gemified
* Faster CSV parsing
* Faster CSV writing
* Clean new CSV parser implementation for further improvements
* Reconstructed test suites for further improvements
* Benchmark suites for further performance improvements
These improvements are done without breaking backward compatibility.
This talk describes details of these improvements by a new csv maintainer.
PGroonga 2 – Make PostgreSQL rich full text search system backend!Kouhei Sutou
PGroonga 2.0 has been released with 2 years development since PGroonga 1.0.0. PGroonga 1.0.0 just provides fast full text search with all languages support. It's important because it's a lacked feature in PostgreSQL. PGroonga 2.0 provides more useful features to implement rich full text search system with PostgreSQL. This session shows how to implement rich full text search system with PostgreSQL!
This talk describes about PGroonga that resolves these problems.
PGroonga 2 – Make PostgreSQL rich full text search system backend!
The history of testing framework in Ruby
1. The history of testing framework in Ruby Powered by Rabbit 2.1.9
The history of
testing framework
in Ruby
Kouhei Sutou
ClearCode Inc.
RubyKaigi 2015
2015-12-12
2. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Silver sponsor
3. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Goal
目標
You know about
/Atest.+unitz/i
/Atest.+unitz/iを知ること
4. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Test
テスト
Which Rubies do include
/Atest.+unitz/i?
/Atest.+unitz/iを含んでいるRubyはどれでしょう?
1.4 1.6 1.8
1.9.1 1.9.2 1.9.3
2.0 2.1 2.2
2.3
5. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Answer
答え
Which Rubies do include
/Atest.+unitz/i?
/Atest.+unitz/iを含んでいるRubyはどれでしょう?
1.4 1.6 1.8
1.9.1 1.9.2 1.9.3
2.0 2.1 2.2
2.3
7. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Characters
登場人物
testsupp RubyUnit
Lapidary
Test::Unit test/unit
test-unit minitest
RSpec
8. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Ruby 1.3 times
Ruby 1.3の時代
1998-1999✓
The first testing framework
for Ruby was released
最初のRuby用のテスティングフレームワークがリリース
testsupp✓
✓
9. The history of testing framework in Ruby Powered by Rabbit 2.1.9
testsupp
1999-4-11: [ruby-talk:00634]
ANN: testsupp.rb 0.1
✓
Perl's Test like API
PerlのTestモジュールのようなAPI
Perl's Test exists since 1998
PerlのTestモジュールは1998からある
✓
✓
10. The history of testing framework in Ruby Powered by Rabbit 2.1.9
testsupp: API
require "testsupp"
include TestSupp
start_tests
ok "Hello" == "Hello"
end_tests
11. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Ruby 1.4 times
Ruby 1.4の時代
1999-2000✓
The first xUnit testing
framework for Ruby was
released
最初のRuby用のxUnit系テスティングフレームワークが
リリース
RubyUnit✓
✓
12. The history of testing framework in Ruby Powered by Rabbit 2.1.9
RubyUnit
Since 1999-11-20 at least
少なくとも1999年11月20日には存在していた
[ruby-list:18594]
"RubyUnit のページは当分更新されないと思うです."
✓
✓
The first xUnit testing
framework for Ruby
最初のRuby用のxUnit系テスティングフレームワーク
✓
13. The history of testing framework in Ruby Powered by Rabbit 2.1.9
FYI: XP
参考情報:XP
eXtream Programing✓
The first XP book was
published at 1999
最初のXPの本は1999年に出版
✓
xUnit was born from XP
xUnitはXPが生み出した
✓
14. The history of testing framework in Ruby Powered by Rabbit 2.1.9
RubyUnit: API
require "runit/testcase"
class TestCalc < RUNIT::TestCase
def test_add
assert_equal(3, 1 + 2)
end
end
15. The history of testing framework in Ruby Powered by Rabbit 2.1.9
RubyUnit: Impression
感想
Ruby-ish
Rubyっぽい
16. The history of testing framework in Ruby Powered by Rabbit 2.1.9
RubyUnit: FYI
RubyUnit:参考情報
Test generator exists
テストジェネレーターがある
✓
Test exec command exists
テスト実行コマンドがある
✓
rubyunit gem exists since 2014-10-12
rubyunitというgemが2014年10月12日から存在する
Not related product
関係のないプロダクト
✓
✓
17. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Ruby 1.6 times: 1
Ruby 1.6の時代:1
2000-2002✓
The second xUnit testing
framework for Ruby was
released
2つ目のRuby用のxUnit系テスティングフレームワークが
リリース
Lapidary✓
✓
18. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Lapidary
The first release was
2001-03-20
最初のリリースは2001年3月20日
✓
The second xUnit testing
framework for Ruby
2つ目のRuby用のxUnit系テスティングフレームワーク
Maybe
たぶん
✓
✓
19. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Lapidary: API
require "Lapidary/TestCase"
class TC_Adder < Lapidary::TestCase
def testAdd
assertEqual(3, 1 + 2)
end
end
20. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Lapidary: Impression
感想
Not Ruby-ish
Rubyっぽくない
21. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Lapidary: FYI
参考情報
Has GUI test runner
GUIのテスト実行機能アリ
✓
22. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Ruby 1.6 times: 2
Ruby 1.6の時代:2
Started trying to bundle a
testing framework to Ruby
テスティングフレームワークをRubyにバンドルする
試みを開始
RubyUnit + Lapidary = Test::Unit✓
✓
23. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Test::Unit
Since 2002-02:
[ruby-talk:34744]
✓
The first /Atest.+unitz/i
最初の/Atest.+unitz/i
✓
The author is the author of
Lapidary
Lapidaryの作者が作者
✓
24. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Test::Unit: API
require "test/unit"
class TC_Adder < Test::Unit::TestCase
def test_add
assert_equal(3, 1 + 2)
end
end
25. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Test::Unit: Impression
感想
Ruby-ish
Rubyっぽい
26. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Test::Unit: FYI 1
参考情報1
API is based on RubyUnit
APIはRubyUnitのよう
Has RubyUnit compatible API
RubyUnit互換APIアリ
✓
✓
Impl. is based on Lapidary
実装はLapidaryベース
Has GUI test runner
GUIのテスト実行機能アリ
✓
✓
27. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: Before Ruby 1.8
Ruby 1.8の前までのまとめ
testsupp: Perl like API✓
RubyUnit: Ruby-ish xUnit✓
Lapidary: Not Ruby-ish xUnit✓
Test::Unit:
RubyUnit API + Lapidary Impl.✓
✓
28. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Ruby 1.8 times: 1
Ruby 1.8の時代:1
2003-2013✓
Ruby bundled a testing
framework
Rubyがテスティングフレームワークをバンドルした
Test::Unit aka test/unit
バンドルされたのはTest::Unit
test/unitとも呼ばれる
✓
✓
29. The history of testing framework in Ruby Powered by Rabbit 2.1.9
FYI: Why test/unit?
参考情報:なぜtest/unitと呼ぶか
require "test/unit"
30. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Ruby 1.8 times: 2
Ruby 1.8の時代:2
RSpec was born
RSpec誕生
31. The history of testing framework in Ruby Powered by Rabbit 2.1.9
RSpec
Since 2005-08✓
Tool for Behavior Driven
Development
振る舞い駆動開発用のツール
✓
Active development
開発は活発
✓
32. The history of testing framework in Ruby Powered by Rabbit 2.1.9
RSpec 0.1.0: API
# 2005-08
require "spec"
class SpecAdd < Spec::Context
def add
(1 + 2).should_equal 3
end
end
33. The history of testing framework in Ruby Powered by Rabbit 2.1.9
RSpec: 1.0.0: API
# 2007-05
require "spec"
describe "Add" do
it "should support positive + positive" do
(1 + 2).should == 3
end
end
34. The history of testing framework in Ruby Powered by Rabbit 2.1.9
RSpec 1.0.0: Impression
感想
Engl-ish
英語っぽい
35. The history of testing framework in Ruby Powered by Rabbit 2.1.9
RSpec: FYI
参考情報
Test exec command exists
テスト実行コマンドがある
RubyUnit like
RubyUnitみたい
✓
✓
More features than Test::Unit
Test::Unitより機能が多い
Mock, Not implemented, ...
モックや未実装など
✓
✓
36. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Test::Unit in Ruby 1.8
Ruby 1.8バンドル後のTest::Unit
No active development
開発は停滞
✓
Maintainer was changed
メンテナー交代
The author of minitest
後のminitestの作者
✓
✓
37. The history of testing framework in Ruby Powered by Rabbit 2.1.9
RSpec and Test::Unit
RSpec is getting better but
Test::Unit isn't changed...
RSpecはよくなっているのにTest::Unitは変わらない。。。
✓
Test::Unit should also be
getting better!
Test::Unitももっとよくしたい!
✓
38. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Test::Unit:
new maintainer
新しいメンテナー
New maintainer said:
新メンテナー曰く
Can't maintain Test::Unit because
it's too complex
Test::Unitは複雑すぎてメンテナンスできない
✓
✓
39. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: Ruby 1.8 times
Ruby 1.8時代のまとめ
Ruby started bundling
Test::Unit (/Atest.+unitz/i)
RubyがTest::Unitのバンドルを始めた
But Test::Unit was died...
バンドル後、Test::Unitは死んだ。。。
✓
✓
RSpec was born and active
RSpecが生まれ、活発だった
✓
40. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Ruby 1.9 times
Ruby 1.9の時代
2009-2014✓
Ruby dropped Test::Unit
RubyがTest::Unitを捨てた
Because Test::Unit is too complex
for new maintainer
新メンテナーにはTest::Unitは複雑すぎるから
✓
✓
41. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Test::Unit → test-unit
Released as test-unit gem
test-unit gemとしてリリース
Still /Atest.+unitz/i
名前変更後も/Atest.+unitz/i
✓
test-unit 1.2.3 == Test::Unit in Ruby 1.8✓
✓
Maintainer was changed
メンテナー交代
Me
私
✓
✓
42. The history of testing framework in Ruby Powered by Rabbit 2.1.9
test-unit
Since 2008-03✓
Active development
開発は活発
✓
High backward compatibility
高い後方互換性
Exception: Inheritance
例外:継承時の挙動
✓
✓
43. The history of testing framework in Ruby Powered by Rabbit 2.1.9
minitest
Since 2008-10✓
Active development
開発は活発
✓
The author is the new
maintainer of Test::Unit
作者はTest::Unitの新メンテナー
✓
44. The history of testing framework in Ruby Powered by Rabbit 2.1.9
minitest and Test::Unit
Mini, simple, clean and fast
小さくてシンプルでキレイで速い
✓
The author said:
作者曰く
100% Test::Unit compatible
Test::Unitと100%互換
✓
But it's not compat in fact...
実際は互換ではなかった。。。
✓
✓
45. The history of testing framework in Ruby Powered by Rabbit 2.1.9
test/unit in Ruby 1.9
Provide Test::Unit API
Test::Unit互換APIを提供
✓
Wrapper of minitest
minitestのラッパー
Ruby developers developed it
not minitest author
minitestの作者ではなくRuby開発者が開発
✓
✓
Not Test::Unit but /Atest.+unitz/i
Test::Unitではないが/Atest.+unitz/iではある
✓
46. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: Ruby 1.9 times
Ruby 1.9時代のまとめ
Ruby dropped Test::Unit
RubyがTest::Unitを捨てた
Test::Unit → test-unit gem✓
✓
Ruby bundled minitest
Rubyはminitestをバンドルした
✓
Ruby created test/unit
(test/unit provided Test::Unit API)
RubyはTest::Unit APIを提供するtest/unitを新しく作った
✓
47. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Ruby 2.0 times
Ruby 2.0の時代
2013-✓
No highly important things
特筆すべきことはない
test-unit, minitest and RSpec
were actively developed
test-unitもminitestもRSpecも活発に開発が進んでいた
✓
✓
48. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Ruby 2.1 times: 1
Ruby 2.1の時代:1
2013-✓
minitest 5 introduced
incompatible changes
minitest 5で非互換の変更が入った
✓
49. The history of testing framework in Ruby Powered by Rabbit 2.1.9
minitest 5
test/unit maintainer said:
test/unitメンテナー曰く
Can't maintain test/unit with
minitest 5
minitest 5向けのtest/unitはメンテナンスできない
✓
✓
test/unit for minitest was
dropped
minitestのラッパーとしてのtest/unitを捨てた
✓
50. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Is no test/unit problem?
test/unitがないことは問題なのか?
Ruby used test/unit for
Ruby's tests
RubyはRubyのテストにtest/unitを使っていた
No test/unit means existing tests
can't be worked
test/unitがなくなると既存のテストが動かない
✓
✓
51. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Solution idea: 1
解決案:1
Keep bundling and using
minitest 4
minitest 4のバンドルを継続し、使い続ける
Users will be confused because
the latest Ruby doesn't bundle
the latest minitest
最新のRubyに最新のminitestがバンドルされていないと
ユーザーは混乱しそう
✓
✓
52. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Solution idea: 2
解決案:2
Bundle the latest minitest
最新のminitestをバンドルする
Ruby uses minitest 4 and test/
unit for its tests
Rubyのテストにはminitest 4とtest/unitを使う
✓
✓
Accepted!
53. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Note for idea 2
案2の補足
Need to care existing
Test::Unit API users
既存のTest::Unit APIユーザーをケアする必要がある
Backward compat is important!
後方互換性は重要!
✓
✓
Bundle test-unit gem too for
Test::Unit API
Test::Unit互換APIのためにtest-unit gemもバンドル
✓
54. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: Ruby 2.1 times
Ruby 2.1時代のまとめ
Ruby developers decided to
maintain minitest 4 and test/
unit for Ruby's tests
Ruby開発者はRubyのテスト用にminitest 4とtest/unitをメ
ンテナンスすることを決めた
✓
55. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Ruby 2.2 times: 1
Ruby 2.2の時代:1
2014-✓
Upgraded bundled minitest to
5
バンドルしているminitestを5に更新
Moved minitest 4 and test/unit to
test/
minitest 4とtest/unitはtest/以下に移動
✓
✓
56. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Upgraded minitest to 5
minitest 5に更新
- lib/minitest/*.rb
+ test/lib/minitest/*.rb
- lib/test/unit.rb
+ test/lib/test/unit.rb
- lib/test/unit/**/*.rb
+ test/lib/test/unit/**/*.rb
57. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Ruby 2.2 times: 2
Ruby 2.2の時代:2
Bundled test-unit gem again
for users
再びtest-unit gemをバンドル
Ruby 1.9 dropped test-unit gem
Ruby 1.9はtest-unit gemを捨てた
✓
✓
58. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Bundled test-unit again
test-unitを再びバンドル
test-unit gem provides:
lib/test-unit.rb
lib/test/unit.rb
lib/test/unit/**/*.rb
59. The history of testing framework in Ruby Powered by Rabbit 2.1.9
test/unit in Ruby 2.2
Ruby 2.2のtest/unit
For Ruby developers
Ruby開発者にとっては
test/lib/test/unit✓
✓
For users
ユーザーにとっては
lib/test/unit = test-unit gem✓
✓
60. The history of testing framework in Ruby Powered by Rabbit 2.1.9
FYI: test/lib/test/unit
Includes useful features for
Ruby's tests
Ruby本体のテストに便利な機能が入っている
Leak checker for file descriptor,
thread, process...
リークチェッカー:ファイルディスクリプターやスレッ
ドのリークやゾンビプロセスを検出
✓
Memory usage profiler
メモリー使用量のプロファイラー
✓
✓
61. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: Ruby 2.2 times
Ruby 2.2時代のまとめ
Bundled minitest 5
minitest 5をバンドル
✓
Bundled test-unit again
再びtest-unitをバンドル
✓
Ruby's tests used forked
mintiest 4 and test/unit
Rubyのテストはフォークしたminitest 4とtest/unitを使う
✓
62. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Ruby 2.3 times
Ruby 2.3の時代
2015-✓
No highly important things
特筆すべきことはない
test-unit, minitest, test/lib/
test/unit and RSpec were actively
developed
test-unitもminitestもtest/lib/test/unitもRSpecも活
発に開発が進んでいた
✓
✓
63. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: History: 1
歴史のまとめ:1
Ruby 1.4 and 1.6 didn't
bundle any testing framework
Ruby 1.4と1.6はテスティングフレームワークをバンドル
していなかった
✓
Test::Unit was born in Ruby
1.6 times
Ruby 1.6の時代にTest::Unitが生まれた
The first /Atest.+unitz/i✓
✓
64. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: History: 2
歴史のまとめ:2
Ruby 1.8 bundled Test::Unit
Ruby 1.8はTest::Unitをバンドルした
/Atest.+unitz/i in 1.8✓
✓
Ruby 1.9 dropped Test::Unit
and bundled minitest
Ruby 1.9はTest::Unitを捨ててminitestをバンドルした
✓
65. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: History: 3
歴史のまとめ:3
Ruby 1.9 provided test/unit
as a wrapper of minitest
Ruby 1.9はminitestのラッパーとしてtest/unitを提供した
test/unit provided Test::Unit
compatible API
test/unitはTest::Unitの互換APIを提供した
✓
/Atest.+unitz/i in 1.9✓
✓
66. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: History: 4
歴史のまとめ:4
Ruby 2.0 is same as Ruby 1.9
Ruby 2.0の状況はRuby 1.9と変わらない
test/unit is /Atest.+unitz/i in
2.0
つまり、2.0での/Atest.+unitz/iはtest/unit
✓
✓
67. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: History: 5
歴史のまとめ:5
Ruby 2.1 didn't upgrade
minitest to 5
Ruby 2.1はminitestを5に更新しなかった
minitest 5 has backward
incompatible changes
minitest 5には後方非互換の変更があった
✓
They break Ruby's tests
非互換を受け入れるとRubyのテストが動かなくなる
✓
✓
68. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: History: 6
歴史のまとめ:6
Ruby 2.2 upgraded minitest
Ruby 2.2はminitestを5に更新した
Dropped test/unit as minitest
wrapper
Ruby 2.2はminitestのラッパーのtest/unitを捨てた
✓
Used forked minitest 4 and test/
unit for its tests
Ruby 2.2はRubyのテスト用にminitest 4のフォークと
test/unitを使うことにした
✓
✓
69. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: History: 7
歴史のまとめ:7
Ruby 2.2 bundled test-unit
gem again
Ruby 2.2はtest-unit gemを再びバンドルした
/Atest.+unitz/i in 2.2✓
✓
70. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: History: 8
歴史のまとめ:8
test/lib/test/unit was
evolved for Ruby's tests
test/lib/test/unitはRubyのテスト用に進化した
/Atest.+unitz/i in 2.2 too✓
✓
71. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: History: 9
歴史のまとめ:9
No highly important things
in Ruby 2.3
Ruby 2.3には特筆すべきことはない
✓
72. The history of testing framework in Ruby Powered by Rabbit 2.1.9
What's /Atest.+unitz/i
/Atest.+unitz/iはなにか
Test::Unit
compatible API
Test::Unit互換API
73. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Test::Unit compat API
Test::Unit互換API
class XXXTest < Test::Unit::TestCase
def test_xxx
assert_equal(xxx, yyy)
end
end
74. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Test::Unit API spirit
Test::Unit APIの魂
Ruby-ish
Rubyらしさ
75. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Ruby-ish in Test::Unit
Test::UnitでのRubyらしさ
Write test as normal Ruby
script
普通のRubyスクリプトのようにテストを書ける
It's important in minitest too
minitestもこれを大事にしている
✓
✓
76. The history of testing framework in Ruby Powered by Rabbit 2.1.9
By example: 1
実例:1
Grouping tests
テストのグループ化
↓
class
77. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Group: 1
グループ化:1
class TestAdd < Test::Unit::TestCase
def test_positive_positive
assert_equal(3, 1 + 2)
end
def test_positive_negative
assert_equal(-2, 1 + -3)
end
end
78. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Group: 2
グループ化:2
class TestSub < Test::Unit::TestCase
def test_positive_positive
assert_equal(-2, 1 - 3)
end
def test_positive_negative
assert_equal(4, 1 - -3)
end
end
79. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Group: 3
グループ化:3
class TestCalc < Test::Unit::TestCase
class TestAdd < self # TestAdd < TestCalc
# def test_positive_positive
# def test_positive_negative
end
class TestSub < self # TestAdd < TestCalc
# def test_positive_positive
# def test_positive_negative
end
end
80. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: Group: 1
グループ化のまとめ:1
Test case has tests
テストケースは複数のテストを持つ
Test case is class
テストケースをクラスとして実装
✓
Test is method
テストをメソッドとして実装
✓
Class has methods
クラスは複数のメソッドを持つ
✓
✓
81. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: Group: 2
グループ化のまとめ:2
Sub test case is sub class
サブテストケースはサブクラスとして実装
Sub test case is-a parent test
case
TestAdd is a test case of TestCalc
サブテストケースは親テストケースとis-aの関係
✓
✓
82. The history of testing framework in Ruby Powered by Rabbit 2.1.9
FYI: Group
参考情報:グループ化
Test::Unit and minitest
don't support sub test case
is a sub class
Test::Unitとminitestはサブクラスでサブテストケースを
作ることをサポートしていない
✓
test-unit only supports it
test-unitだけがサポートしている
It's the only one incompatible
唯一の非互換
✓
✓
83. The history of testing framework in Ruby Powered by Rabbit 2.1.9
FYI: Group DSL
参考情報:グループ化DSL
class TestCalc < Test::Unit::TestCase
sub_test_case "+" do
test "positive + negative" {}
end
sub_test_case "-" do
test "positive - negative" {}
end
end
test-unit feature
84. The history of testing framework in Ruby Powered by Rabbit 2.1.9
By example: 2
実例:2
Share tests
テストの共有
↓
module
85. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Share: 1
共有:1
module KVSTests
def test_read_write
@kvs[:key] = :value
assert_equal(:value, @kvs[:key])
end
end
86. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Share: 2
共有:2
class TestKVSHash < Test::Unit::TestCase
include KVSTests
def setup; @kvs = {}; end
end
class TestKVSOpenStruct < Test::Unit::TestCase
include KVSTests
def setup; @kvs = OpenStruct.new; end
end
87. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: Share
共有のまとめ
Tests can be shared by module
モジュールでテストを共有できる
Module is used for sharing method
implementations in Ruby
Rubyではモジュールはメソッドの実装を共有するために
使われている
✓
✓
88. The history of testing framework in Ruby Powered by Rabbit 2.1.9
By example: 3
実例:3
Assertion
アサーション
↓
Write as-is
そのまま書く
89. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Assert: Equal
アサート:等価
def test_add
assert_equal(3,
1 + 2)
# ↑↓ as-is
# RSpec: expect(1 + 2).to eq(3)
end
90. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Assert: Predicate
アサート:述語
def test_exist_readme
assert(File.exist?("README"))
# ↑ as-is ↓ not as-is
# RSpec: expect(File).to exist("README")
end
91. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Message from minitest
1) Failure:
TestFile#test_exist_readme [test-file-minitest.rb:5]:
Failed assertion, no message given.
Less information
92. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Message from RSpec
1) File README should exist
Failure/Error: expect(File).to exist("README")
expected File to exist
# ./spec-file.rb:5:in `block (2 levels) in <top (required)>'
Colorized and snippet
93. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Message from test-unit
Failure: <false> is not true.
test_exist_readme(TestFile)
test-file-test-unit.rb:5:in `test_exist_readme'
2:
3: class TestFile < Test::Unit::TestCase
4: def test_exist_readme
=> 5: assert(File.exist?("README"))
6: end
7: end
Colorized and snippet
94. The history of testing framework in Ruby Powered by Rabbit 2.1.9
power-assert
def test_exist_readme
assert do # ↓ as-is
File.exist?("README")
end
end
Built-in in test-unit
95. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Message: power-assert
Failure:
File.exist?("README")
| |
| false
File (NOTE: ← Receiver information)
test_exist_readme(TestFile)
/usr/lib/ruby/vendor_ruby/power_assert.rb:36:in `start'
test-file-power-assert.rb:5:in `test_exist_readme'
2:
3: class TestFile < Test::Unit::TestCase
4: def test_exist_readme
=> 5: assert do
6: File.exist?("README")
7: end
8: end
96. The history of testing framework in Ruby Powered by Rabbit 2.1.9
FYI: test-unit and power-
assert
Don't recommend
"all power-assert"
すべてpower-assertは非推奨
Recommend "power-assert only for
predicate"
述語だけpower-assertを推奨
✓
✓
97. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Assert: Equal
# @group.users should return
# sorted names of user
assert_equal(user_names.sort,
@group.users)
# ↑ Align-able
assert do
@group.users == user_names.sort
end
98. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Align
縦に並べる
Indicate compare targets
visually
視覚的に比較対象ということを示す
✓
Clarify differences visually
視覚的に違いを明確にする
✓
99. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Experiment: 1
実験:1
Find a difference!
違うところを探せ!
Hello | Heilo
100. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Experiment: 2
実験:2
Find a difference!
違うところを探せ!
Hello
Heilo
101. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Align in Ruby
Rubyで縦に並べる
# Arguments are natural
method(arg1,
arg2)
# Operands aren't natural
operand1 ==
operand2
引数だと自然だけどオペランドだと不自然
102. The history of testing framework in Ruby Powered by Rabbit 2.1.9
FYI: test-unit and power-
assert
Don't recommend
"all power-assert"
すべてpower-assertは非推奨
Recommend "power-assert only for
predicate"
述語だけpower-assertを推奨
✓
✓
103. The history of testing framework in Ruby Powered by Rabbit 2.1.9
FYI: Fixture
参考情報:フィクスチャー
Ensure
clean test
environment
キレイなテスト環境を用意する仕組み
104. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Fixture: e.g.
フィクスチャー:例
def setup; p :s; end
def teardown; p :t; end
def test_1; p :t1; end
def test_2; p :t2; end
# :s -> :t1 -> :t ->
# :s -> :t2 -> :t
105. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Fixture: Open file
フィクスチャー:ファイルを開く
def setup
@file = File.open("x")
end
def teardown
@file.close
end
106. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Fixture: Open file
フィクスチャー:ファイルを開く
Not Ruby-ish
Rubyっぽくない
107. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Fixture: Open File
フィクスチャー:ファイルを開く
def setup # Ruby-ish version
File.open("x") do |file|
@file = file
yield
end # Close file automatically
end
New feature in test-unit
108. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: Test::Unit API
まとめ:Test::Unit API
Ruby-ish is important in
Test::Unit API
Test::Unit APIではRubyらしいことは重要
✓
109. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: Test::Unit API
まとめ:Test::Unit API
(Sub) test case by (sub) class
(サブ)テストケースには(サブ)クラスを使う
✓
Share tests by module
テストの共有にはモジュールを使う
✓
as-is in assert
アサートではそのままの使い方で書く
✓
110. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Wrap up: Test::Unit API
まとめ:Test::Unit API
More Ruby-ish
さらにRubyっぽく
Support block based fixture
ブロックを使ったフィクスチャーもサポート
✓
✓
111. The history of testing framework in Ruby Powered by Rabbit 2.1.9
Goal
目標
You know about
/Atest.+unitz/i
/Atest.+unitz/iを知ること