Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Testando Models
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Diogo Beato
June 16, 2016
Programming
38
0
Share
Testando Models
slides para o workshop de teste de models
Diogo Beato
June 16, 2016
More Decks by Diogo Beato
See All by Diogo Beato
Cloud Native Banking
diogobeato
1
100
Logging proativo com ELKW
diogobeato
0
260
Isomorphic Javascript
diogobeato
0
170
Fundamentos da JVM
diogobeato
0
340
MinMax
diogobeato
0
100
TDC - Breaking Build
diogobeato
0
87
Breaking Build
diogobeato
0
260
Boas Práticas em APIs REST
diogobeato
2
760
Design para Programadores - Layout
diogobeato
1
65
Other Decks in Programming
See All in Programming
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
1
600
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
1k
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
780
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
130
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
330
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
700
[KCD Czech] eBPF Meets the GPU: Future of AI Infra Observability
doniacld
0
130
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
2
330
GitHub Copilot CLIのいいところ
htkym
2
1.2k
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
160
AIエージェントと協働するCLI開発 — BunとOpenClawで学んだこと
yoshikouki
1
230
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
670
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.2k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
The Curse of the Amulet
leimatthew05
1
13k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Navigating Team Friction
lara
192
16k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Why Our Code Smells
bkeepers
PRO
340
58k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
400
Paper Plane
katiecoart
PRO
1
51k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
380
Everyday Curiosity
cassininazir
0
220
Transcript
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