Shift test left and effectively debug to beat app quality challenges | StudioFP118
Summary
TLDRこのビデオスクリプトでは、Docker社のStephenとEllieが開発者に対して開発サイクルの早期にソフトウェアに対する自信を与える方法について話しています。彼らは「テスト左移り」という概念を紹介し、Docker Desktopの最新バージョンで利用可能な「Docker Debug」という新しいサービスをデモンストレーションしています。Docker Debugは、開発者がコンテナ内で問題を迅速に特定し、解決できるようにするツールです。さらに、彼らは「Testcontainers」というオープンソースライブラリについても説明しており、これは開発者がIDE内で実際のフィードバックを得るためのものです。これにより、ステージング環境なしで繰り返し可能なテストが可能になります。彼らは両方のツールが開発者の生産性とソフトウェア品質向上に貢献するのに役立つと述べています。
Takeaways
- 🐳 Dockerは開発者に対して開発サイクルの初期段階で書かれたソフトウェアに対する自信を与えることに注力しています。
- 🔧 Docker Debugは開発者がIDEやマシン上でコードをビルド、デバッグ、テストする際に役立つ新しいDockerのサービスです。
- 🛠️ Docker Debugはコンテナ内で実行されているツールを活用し、コンテナの状態にかかわらず(実行中でも停止中でも)デバッグを可能にします。
- 👨💻 Testcontainersは開発者がIDE内でリアルなフィードバックを得るために使用できるオープンソースライブラリです。
- 🔄 Testcontainersは開発者がステージング環境なしで繰り返し可能なテストを実行できるように支援するフレームワークです。
- 🌐 Testcontainers Cloudを利用することで、ローカル開発やCI環境で同じバックエンドを利用し、一時的なリソースをオンデマンドで取得できます。
- 🛑 開発者がIDE上でバグを修正し、すぐに再テストすることができるため、開発プロセスが効率化されます。
- 📚 Testcontainersは10以上の言語で利用可能で、さまざまなコンテナをテストするための統合された便利な方法を提供しています。
- 🤝 コミュニティとパートナーシップによって、Testcontainersのカタログはオープンソースとして成長し、多くのサービスが追加されています。
- 🚀 Docker DebugとTestcontainersは両方とも現在利用可能で、開発者からの興味とポジティブなフィードバックを受けています。
- 🔍 開発者たちはDockerを通じてレガシーアプリケーションをコンテナ化し、開発環境を本番環境のように扱うことでセキュリティを強化し効率化に興味津々です。
Q & A
「シフトテスト左」とはどのような概念ですか?
-「シフトテスト左」とは、開発サイクルの初期段階で問題を見つけることに重点を置いたソフトウェアテストのアプローチです。開発者がコードを書く、デバッグし、テストする開発ループの早い段階で問題を見つけることで、開発者の自信を高めることを目的としています。
Dockerはどのようにして開発者の開発ループに貢献していますか?
-Dockerは開発者がIDEやマシン上でコードを書いたりデバッグしたりする開発ループにおいて、より生産的になることを目指しています。問題を早く発見し、開発サイクルの初期段階で自信を高めることで、開発者の満足度を高めることに重点を置いています。
Docker Debugとはどのようなサービスですか?
-Docker DebugはDockerが提供する新しいサービスで、開発者がコンテナ内で問題をデバッグする際に必要なツールを提供します。コンテナ内で動作しているツールを簡単にインストールし、使用できるようになります。
Docker DebugはどのバージョンのDocker Desktopで利用できますか?
-Docker Debugは最新バージョンのDocker Desktopで利用できます。
Docker Debugはコンテナの状態に依存しますか?
-Docker DebugはDocker Execとは異なり、実行中のコンテナだけでなく、停止したコンテナやイメージでも使用できます。
Testcontainersとはどのようなライブラリですか?
-Testcontainersはオープンソースのライブラリで、開発者がステージング環境なしにIDE内でリアルなフィードバックを得られるようにします。これにより、開発者はコードを書く際に問題を早期に発見し、開発サイクルの初期段階で問題を解決できます。
Testcontainersはどの言語で使用できますか?
-Testcontainersは10以上の言語で使用でき、様々なサービスと統合することができます。
Testcontainers Cloudとはどのようなサービスですか?
-Testcontainers Cloudは一時的なクラウドソリューションで、ローカル開発やCI環境で同じバックエンドを利用し、一時的なリソースを必要に応じて提供します。これにより、テストの結果が環境によって異なることを防ぎます。
Docker DebugとTestcontainersはどちらが先に開発されたか教えてください。
-スクリプトからはその情報が得られませんが、どちらのサービスも現在利用可能であり、開発者が効率的にソフトウェアを開発・テストするためのツールとして提供されています。
Docker DebugとTestcontainersはどのように相補的な役割を果たしていますか?
-Docker Debugはコンテナ内での問題をデバッグするツールであり、TestcontainersはIDE内でリアルなフィードバックを得るためのライブラリです。これらは開発者がコードを書く、テストし、問題を解決するプロセスを効率化し、開発サイクルの早期段階で問題を特定し解決するのに役立ちます。
スクリプトで紹介された機能はどのようにして試すことができますか?
-スクリプトで紹介された機能については、最新バージョンのDocker Desktopをダウンロードして利用することができます。また、Testcontainersも同様に利用可能です。
Outlines
🐳 Dockerとテスト左移の紹介
この段落では、スピーカー1がDockerとテスト左移のトピックに触れています。DockerのStephenとEli Aleynerを招待し、開発者が開発サイクルの早期段階でソフトウェアに対する自信を持つことの重要性を強調しています。Dockerは開発者がIDEやマシン上でコードを構築、デバッグ、テストする際の開発ループにおいて、特にコードをGitリポジトリにチェックインする前にも、自信と生産性を高めることに大きな力を入れています。また、問題を早期に発見し、開発者の満足度を高めることで、エンジニアの幸福感も向上するという側面も触れられています。彼らは開発者が開発サイクルの早期段階で書いているソフトウェアに対する自信をさらに高める2つの具体例を紹介すると約束しています。
🛠 Docker Debugのデモンストレーション
Stephen NovickはDocker Debugという新しいDockerのサービスを紹介し、Docker Desktopの最新バージョンで利用可能であると述べています。彼は簡単なPythonウェブサイトを実行し、その中で問題を見つけるためにDocker Debugを利用しています。Docker Debugは、コンテナ内で動作するシェルであり、開発者が必要なツールをコンテナに持ち込めるようになります。デモンストレーションでは、コンテナ内でファイルを編集し、問題を解決する方法を示しており、これにより開発者はコンテナの状態にかかわらず、実行中のものや停止しているもの、またはイメージから直接デバッグが可能であると強調しています。
🔧 Testcontainersによる開発者フィードバックの改善
Eli AleynerはTestcontainersというライブラリとその開発者フィードバックの向上について話しています。Testcontainersはオープンソースフレームワークで、10以上の言語で利用でき、開発者がステージング環境なしでIDE内でリアルなフィードバックを得られるようになります。Eliは.NETで動作する天気アプリケーションを例に、SQL Serverコンテナを起動し、機能テストを実行する方法を説明しています。このプロセスでは、新しいSQL Serverが起動し、テストが実行され、終了後は自動的に削除されるため、開発者は環境のセットアップや管理を心配する必要がなくなります。また、Testcontainers Cloudを利用することで、ローカル開発やCI環境で同じバックエンドを利用し、一時的なリソースを必要に応じて利用できると紹介しています。
🎉 Docker DebugとTestcontainersの利用とフィードバック
最後の段落では、スピーカー1がStephenとEliにフィードバックを求めています。Docker DebugとTestcontainersが利用可能で、開発者からの興味と喜び、特にセキュリティと開発テスト環境を本番環境と同じように扱うというアプローチに関心があると報告しています。開発者たちはコンテナ化されたレガシーアプリケーションの利点や効率性、ローカル環境への移行に興味を持ち、Docker Debugを使った開発者からはデバッグ時間の短縮に感激しています。また、Testcontainersを利用して開発者たちがリアルなフィードバックを得られることにも興味を示しています。最後に、Docker DebugとTestcontainersについてもっと知りたいと興味を持っている開発者向けに、Microsoft.comのパートナーページへのリンクを案内しています。
Mindmap
Keywords
💡シフトテスト左
💡Docker
💡Docker Desktop
💡Docker Debug
💡コンテナ
💡テストコンテナ
💡IDE
💡テストの反復性
💡Testcontainers Cloud
💡開発者満足度
Highlights
Shifting test left is a concept aimed at integrating testing earlier in the development cycle.
Docker focuses on giving developers confidence in their software early in the development process.
Developers can find issues faster and gain more confidence by testing early in their development loop.
Docker introduces Docker Debug, a new offering for debugging within containers.
Docker Debug provides a shell attached to a running container with tools for debugging.
Docker Debug can be used on stopped containers or images, unlike Docker Exec.
Testcontainers is an open-source library that allows developers to get real feedback in their IDE.
Testcontainers enables developers to perform functional testing without needing a staging environment.
Testcontainers can start a fresh SQL server for testing and remove it after the test is complete.
Testcontainers Cloud provides ephemeral resources on demand for consistent testing across environments.
Developers can connect to a Testcontainers Cloud session to see data inside a container.
Testcontainers supports over 10 languages and can test anything available as a container.
The Testcontainers catalog is open source with contributions from partners.
Docker Debug and Testcontainers are both available now for developers to try out.
Developers are interested in learning how to containerize legacy applications for efficiency.
Security is a key focus, treating dev/test environments as if they were production.
Feedback from developers has been positive, with excitement about the new tools and functionalities.
More information on Docker Debug and Testcontainers can be found on Docker's feature partners page.
Transcripts
SPEAKER 1: [MUSIC] Hey,
we're welcome back.
We've got friends and demos,
and we're talking about shifting test left.
I've heard about shifting left.
But now, we're going to talk about shifting test left.
Try to say that ten times fast.
I've got my friends Stephen and Ellie here from Docker.
Love me some containers.
I love me some Docker Whales.
Doctor Eli Aleyner action.
ELI ALEYNER: We're going
to have some whales.
Yes. Over here.
SPEAKER 1: Are we? A t duty.
To bring some with us.
You bught
some whales with you.
Awesome. You're here
to talk about shifting left, particularly with test.
Let's demystify this a
little bit and talk about what does that
mean for developers from a Docker perspective.
Excellent.
For us a Docker,
we are really big about giving developers
confidence in the software that
they write early in the development cycle.
We often talk about all of the things developers do in
the inner development loop
as they're building, debugging,
and testing their code in their IDE on their machine,
even oftentimes before they
check in their code into a Git repository.
For us, getting developers more
productive in the loop is very
core to us because not only does it mean
that you're finding issues faster,
you're getting more confidence in what you're building.
You're finding issues much earlier in
the development cycle but also as engineers.
What's really core to us is
the satisfaction we get from building software and
by being able to find issues
and be more productive as we're developing,
it actually makes your engineers
and us as engineers happier.
We're thrilled to show you today two things,
two specific examples of how you were able to do yet
more confidence in the software that you're
writing early in your development cycle.
We're
fighting all this stuff
out well before
we run in into
production and start falling over on things.
That is correct.
I heard there's demos.
I'm only here for the demos, no offense.
STEVEN NOVICK: Our first demo,
we're going to talk about
a new offering we have at Docker called Docker Debug.
You can try Docker Debug out
today in the latest versions of Docker Desktop.
Here, I have a simple Python website running.
It appears I might have
forgotten to update it from last year.
SPEAKER 1: It is not 2023, my friend.
STEVEN NOVICK: No, it is not
live in the time zone.
The whales missing. I promise you whales.
There's no whales. It says Walt gift there.
No problem. We'll just
go into the container. We'll do Docker.
SPEAKER 1: Hang on. Wait.You're not
doing Docker live on the demo, are you?
STEVEN NOVICK: I am, because
everybody's had such a pleasant experience with.
SPEAKER 1: It is so easy
to use, right everyone?
Chat? You with me?
STEVEN NOVICK: No. Of course, and, like,
obviously, live on the demo.
I forgot my shell. There we go.
Now I'm in. No problem.
I'm just going to open up the file. Wait.
SPEAKER 1: Hang on.
STEVEN NOVICK: Don't have Nano.
No problem.
Let's try VM.
SPEAKER 1: Yeah, we're good.
No, we're not good.
STEVEN NOVICK: No.
Let's see what's running with H Top.
No, nothing there either.
Here the problem, Joey.
This is a slim container as most containers are today.
The great thing about slim
containers is they're great for security.
They're great for your resource management
because they strip out everything that's not needed.
What they're not great for is
debugging and trying to figure
out when something's wrong because it
doesn't have your applications.
On it. No problem.
That's why we develop Docker Debug.
I'm just going to go into this. Too many keys here.
SPEAKER 1: I can't type on demos
live either. We go. It's all.
STEVEN NOVICK: I'm in.
What Docker Debug is,
is a shell that's attached running Nick OS,
and we can bring all our tools with
us to whatever container we're going to,
so you install a Tool 1, and it's there.
Here I can see just by running HTp I
see all my processes running in this container.
You can run other common tools.
But for now, I'm just going to go in and
go in and edit this container. Here we go.
Update the year, and I think I found the typo in
my file and let's refresh. We have whales.
We have whales. We have whales.
SPEAKER 1: You promise. I promise.
STEVEN NOVICK: As I mentioned
lots of different tools.
I'm just going to run simple library called Tree,
I don't have it installed.
No problem. We're just going to install this.
Now, this is the magic of a live demo.
This takes 15 and 20 seconds.
SPEAKER 1: We're going
to stand here and
stare at each other awkwardly?
STEVEN NOVICK: Very awkwardly. Talk about
the pretty whale on the screen.
But the beauty is once this is installed,
whenever I run Docker Debug
on any container, I have all the packages.
Think of it as a tool kit.
If you're an electrician going house to house,
rather than relying on the tools that
the person in the house has when you show up,
you actually have your toolkit.
You're comfortable using those tools every house you go.
It makes you more efficient.
Now I have this installed
and my simple directory shows up.
SPEAKER 1: Hey,
let me ask you one quick question here.
You said any container?
What about container state,
any of that stuff you have to think about those things?
STEVEN NOVICK: That's a great point.
One of the great things about Docker Debug
is that unlike Docker Exec,
which only runs on running containers,
Docker Debug can actually go
into a stop container or images.
Let me show. We're going to stop this container really
quick and click,
there we go, "More live demo Magic".
SPEAKER 1: We love it. It's all good.
STEVEN NOVICK: There we go.
It's stopped. We're going to click on
the exact tab in Docker Desktop, and up.
It's not working because it's not running.
Right. All I'm going to do is flip on Debug mode. This,.
SPEAKER 1: Wait.
STEVEN NOVICK: Now I'm going to run that
simple tool I just installed.
It's running there on the stop container.
I can run HTp see
that nothing's running in the actual shell itself.
I have access to the file.
This is the magic of Docker Debug and so,
anybody can try this out today on
the latest versions of Docker desktop.
SPEAKER 1: You also
talked about not just
stop but also the images itself?
STEVEN NOVICK: You can run this
directly on an image
itself and go see the details of what's in the image.
Very good.
I'm going hand it over to Ellie,
who's going to show us what we have in
store with test containers. Excellent.
SPEAKER 1: Pressures on, Ellie.
I'm excited too. Stephen,
talked to you about
debugging and debugging in containers.
But how do you get productivity even before you check
in your code and before you are in a container,
before you're running in a container.
Today, I'm going to talk to you about
library and open source library that we have
that's called test containers and
what test containers allows developers to
do is it allows developers to get
a real feedback right in the IDE,
is they're they're building
their software without the need for
a staging environment or anything else.
Today is you're building software.
You can do unit testing in your local ITE,
or you can go and depend on
a staging environment after you check in your code.
I'm going to show you something slightly
different where you're able to get this feedback.
Right in your inner loop and
discover bugs as you go along.
Test containers is an open source framework
that's built in over 10 languages.
Let me show you how it works. Let' take a look.
ELI ALEYNER: What I have over here is I
have weather application in.NET catering
to the audience over here.
Typically, in order to test an application,
I would need to have SQL server running.
I would need to manage it state.
I would need to clean stuff in SQL server.
SPEAKER 1: Sure.
ELI ALEYNER: What I'm able to
do over here is I'm
able to say in code,
hey, give me a Microsoft SQL container right here.
Then what I'm able to do is I'm able to say, hey,
okay, this is a functional test.
It will start the application,
it will hit the API,
and it will check the number of
results that it gets back.
What I'm able to do without
any setup with very little magic, almost none.
I'm able to hit "Run" right in
my IDE over here, and there we go.
I'm doing the live demo over here.
What happens under the covers
is my application are starting.
My application is bringing SQL server,
starting a fresh SQL server.
It will run the test against it,
and when it's done, it
will remove it and make it disappear.
What it allows us to do it allows us to do
self-contained item potent repeatable tests
without depending on
a staging environment or anything else.
Let's see a live demo over here.
Let's see what actually happens as
we go along over here.
SPEAKER 1: While that's running.
There's no backend Cloud infrastructure.
ELI ALEYNER: That is a little
bit of a trick.
There we go. Thank you.
SPEAKER 1: I knew there was a catch.
I got him right there.
ELI ALEYNER: This runs perfectly locally.
But in this particular instance,
we're using an ephemeral Cloud solution
called Testcontainers Cloud.
Which allows us to have the same testing,
regardless of whether I'm
running on a windows, on a Mac,
and whether I'm doing it in
my local development or in a CI environment,
I get absolutely the same backend
and I get ephemeral resources on demand.
If we go back to the demo over here, oh, wait.
This was a test that was expecting
seven days of results.
The test actually wait,
it shows that it was expecting eight.
Actually, it was a test that
was wrong in this particular instance.
What I'm able to do over here,
I'm able to fix the bug,
and then instantly over here, click "Run" again,
and it will do it over again and it will
go and get it running as we go.
Because you've talked a little bit
about the fact that we're using run over here.
If we're using the Cloud over here,
what I'm able to do is I'm able
to go into Testcontainers Cloud,
and I'm able to see, oh,
look, those are the sessions.
Stephen over here, I'm logged in and
Stephen is doing some testing.
He's doing testing with SQL server.
Here are the containers that are starting,
and I'm able to connect to that session and see
what's the data that's inside of that container.
There we go. Connect terminal,
and it will connect to that container
in a second. There we go.
I can do all the commands over here on the container.
Let's go back to the IDE.
Let's see the test results.
There we go. My test has passed.
SPEAKER 1: You've passed your test.
ELI ALEYNER: There we go.
SPEAKER 1: No need to
take all of this,
move it to another environment.
It's all right there, and you haven't
even left your IDE.
ELI ALEYNER: I haven't left my IDE,
as other check in their test,
I'm able to clone the tests,
and I'm able to hit "Run",
and I'm able to get the same results
because the test has
everything it needs in order
to test the functionality repeatedly.
Testcontainers, just briefly,
as I said, available in 10 languages.
You can test anything that's available as a container,
and we have a full suite
of integration convenience methods,
including a number of services in Azure,
including Microsoft SQL Server as I've just demo
and Kafka and many other partner integrations.
SPEAKER 1: I would imagine that
these modules are also growing,
and people are bringing in things
and expanding what's available here.
ELI ALEYNER: Absolutely.
The catalog over here is
open source and we have
partners who are contributing catalogs,
and we have many partners who are taking ownership.
Of those modules and becoming official modules as well.
SPEAKER 1: Steven mentioned that
the stuff that
he was showing available now.
The doctor debug stuff available now.
How about Testcontainers?
ELI ALEYNER: Testcontainers is available
now as well.
SPEAKER 1: Very good.
ELI ALEYNER: It's been running out there,
and very excited to have people try it and use it.
SPEAKER 1: In just the couple
of minutes that we
have left, you've been around.
You've been showing this to our developers,
and some of them have been clapping along.
What has been the sense of it? What is the feedback?
What are you hearing from people as they
see this like live and in person?
STEVEN NOVICK: Yeah, we're hearing
lots of people
interested in learning more about containers,
how they can containerize their legacy applications.
Utilize Docker to make them more efficient.
Shift left, bring more to the local environment.
People who have tried out Docker Debug
or seen it for the first time,
blown away by how much time it's going to save them
from figuring out how no pun intended debug exec.
SPEAKER 1: **** exec.
STEVEN NOVICK: Lots of excitement.
ELI ALEYNER: Then on your side, to Ali,
as an operations person myself,
who look, we talked a lot about security today.
We talk about going
and finding all of these environments,
and more importantly, treating
your dev test environment as if it was production.
This makes that even simpler.
We're seeing people who come and talk to us are
really fascinated by the ability
to go and get realistic feedback and the tooling and
the functionality that we're
making available for developers.
Those messages resonate and they're excited,
and we're excited to see those products and
those functionalities helping the lives of
developers that get the user.
If you want to find more about Testcontainers and
Docker Debug and all the amazing things
that you guys have been up to,
and Docker head on over to
the feature partners
page on build.Microsoft.com,
hit the little click down.
Go to Docker and look
at all of the things that they have.
Go test their stuff and use it now,
and then come back and tell us how awesome it was.
Gentlemen, thank you so very much.
STEVEN NOVICK: Thank you Joey.
SPEAKER 1: We have more coming up,
so don't go anywhere.
Don't leave. Stay right here.
5.0 / 5 (0 votes)