22
Hong Jun Software Development Engineer @ Amazon

Applying BDD in refactoring

Embed Size (px)

Citation preview

Hong JunSoftware Development Engineer @ Amazon

10+ years old legacy system Complicated business logic Messy code, without unit tests Lost the requirement/specification The 90+% members of the current

team are the new hire

Simplify, more maintainable Better quality, testable Continues integration Able to deploy everyday

Build Server

How about integrate them?

ScenariosScenarios

Design and implement Test

CasesBusiness

Logic/Story

Design and implement the

module Verify

deploy

Scenarios also provide an invaluable regression test suite.

End to end Smoke Test

Functional Integration Test

Unit Test

End to end, black box testing

functional, white box testing

• Natural languageSpec/Scenario

• JBehaveParser

• TestSteps[POJO]Step Logic

• Action/Utils(Reusable)Action/utils

Incremental Delivery

The framework/plug-in structure that let us can deliver our features incrementally; for picked the features during runtime instead of during commit time, that will help us reduce code branching requirements, make our integration and delivery process faster.

Throughput Throttling

Throughput Controller let the deployment same as the real production deployment structure that not only let us control the volume finer and easier, but also let us find some issues involving multi instances running parallelly (such as: resource concurrent access, load balance and etc.) possible.

Incident Recovery

When the incident happen, the process about the type message involving the issues could be switched back to the legacy part automatically.

Now, we can get there safely.Here we go!

http://weibo.com/hongjun

[email protected]