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
Diogo Beato
June 16, 2016
Programming
0
37
Testando Models
slides para o workshop de teste de models
Diogo Beato
June 16, 2016
Tweet
Share
More Decks by Diogo Beato
See All by Diogo Beato
Cloud Native Banking
diogobeato
1
95
Logging proativo com ELKW
diogobeato
0
250
Isomorphic Javascript
diogobeato
0
160
Fundamentos da JVM
diogobeato
0
340
MinMax
diogobeato
0
99
TDC - Breaking Build
diogobeato
0
82
Breaking Build
diogobeato
0
260
Boas Práticas em APIs REST
diogobeato
2
750
Design para Programadores - Layout
diogobeato
1
63
Other Decks in Programming
See All in Programming
AI Agent Dojo #4: watsonx Orchestrate ADK体験
oniak3ibm
PRO
0
130
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
230
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
7
4.3k
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
780
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
3
1.2k
CSC307 Lecture 03
javiergs
PRO
1
470
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
5.3k
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
140
クラウドに依存しないS3を使った開発術
simesaba80
0
220
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.5k
Basic Architectures
denyspoltorak
0
200
dchart: charts from deck markup
ajstarks
3
960
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.2k
Designing for humans not robots
tammielis
254
26k
Google's AI Overviews - The New Search
badams
0
890
What does AI have to do with Human Rights?
axbom
PRO
0
1.9k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
2
80
It's Worth the Effort
3n
188
29k
We Are The Robots
honzajavorek
0
130
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Accessibility Awareness
sabderemane
0
35
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
110
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
98
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