Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Testando Models
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Diogo Beato
June 16, 2016
Programming
47
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Testando Models
slides para o workshop de teste de models
Diogo Beato
June 16, 2016
Transcript
17 slides
TESTANDO MODELS
O Bug do model de ocorrencia_agendamento O PROBLEMA
ENTIDADE OCORRÊNCIA AGENDAMENTO
TABELA DE OCORRENCIA_AGENDAMENTO
ENTIDADE OCORRÊNCIA AGENDAMENTO
COMO FAZER UM TESTE PARA PREVINIR ESSES BUGS?
BOAS PRÁTICAS NOS MAPEAMENTOS
BEAN VALIDATION • @NotNull • @Size • @Min • etc…
• Grouping Constraints ->
BOAS PRÁTICAS DE INTEGRIDADE
PORQUÊ TESTAR MODELS? • Teste de regressão • Base de
toda aplicação MVC • Garantir integridade dos dados • Encontrar Smells no seu modelo
DIFICULDADE EM TESTAR MODELS • setup de ambiente de teste
de integração • criar o banco • popular os dados para o teste • voltar o banco ao estado inicial.
DIFICULDADE EM TESTAR MODELS • setup de ambiente de teste
de integração • criar o banco (DOCKER) • popular os dados para o teste (FIXTURE FACTORY???) • voltar o banco ao estado inicial (DOCKER)
PROBLEMAS COM FIXTURE FACTORY • Template engessado. • Problema com
referencia cíclica. • Fixtures geradas com Regex.
HTTPS://GITHUB.COM/DVBEATO/ROOKIE SOLUÇÃO ALTERNATIVA • Templates flexíveis • Facilidade na geração
de dados em grande volume. • Facilidade na geração de dados com relacionamento.
\,,/ DEMO ^ ^ V
PRÓXIMOS PASSOS • aplicar as técnicas no erp-models. • fazer
ele compilar independente (como o erp-commons): • adicionar um sonar pra ele no pull-request e quebrar o build quando baixar as métricas.
None
More Decks by Diogo Beato
See All by Diogo Beato
Cloud Native Banking
diogobeato
1
130
Logging proativo com ELKW
diogobeato
0
270
Isomorphic Javascript
diogobeato
0
190
Fundamentos da JVM
diogobeato
0
350
MinMax
diogobeato
0
110
TDC - Breaking Build
diogobeato
0
91
Breaking Build
diogobeato
0
270
Boas Práticas em APIs REST
diogobeato
2
780
Design para Programadores - Layout
diogobeato
1
71
Other Decks in Programming
See All in Programming
Canvas 2D Context Next
petamoriken
0
140
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
340
コード生成時代のAPI定義を支えるRequest Spec移行
pvcresin
0
300
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
410
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
430
Going Full Circle with Virtual Graphs and Relational Databases
michaelsimons
1
110
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
260
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
170
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
180
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
420
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
150
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
250
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Balancing Empowerment & Direction
lara
6
1.4k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
630
Color Theory Basics | Prateek | Gurzu
gurzu
1
530
Abbi's Birthday
coloredviolet
5
11k
GitHub's CSS Performance
jonrohan
1033
470k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
3k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7.1k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
390
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
610