Otimizando tempo de build: performance da suíte de testes
-
Upload
jonatas-paganini -
Category
Software
-
view
242 -
download
0
Transcript of Otimizando tempo de build: performance da suíte de testes
Optimizing build timePerformance running tests
Jônatas Paganini @jonatasdp Alexandre Tavares @xptavares
dir=/tmp/postgresql-on-memory
mkdir $dir
mount -o size=200M,mode=0666 tmpfs $dir
chown postgres:postgres $dir
dir=/tmp/postgresql-on-memory
mkdir $dir
mount -o size=200M,mode=0666 tmpfs $dir
chown postgres:postgres $dir
sudo su - postgres -c \
'/usr/lib/postgresql/9.4/bin/initdb \
--encoding=UTF8 --pgdata=$dir
if [ -n "${RUN_NIGHTLY_BUILD}" ];
rspec spec/features --tag "~smoke"
if [ -z "${RUN_NIGHTLY_BUILD}" ];
rspec spec/features --tag "smoke"
http://shipit.resultadosdigitais.com.br/blog
● /ruby-e-rspec-melhorando-a-legibilidade-de-seus-testes/● /rspec-performance-tips/● /otimizando-testes-factory-girl-e-rspec/
Conclusion
● Avoid touch database● Avoid callbacks no sense● Avoid things you don’t need● Write specialized factories● Rate (classify) your test● Benchmark all isolated steps
It’s all about responsibilities
Thanks!Github: xptavares
Twitter: xptavares
E-mail: [email protected]
Github: jonatas
Twitter: jonatasdp
E-mail: [email protected]
shipit.resultadosdigitais.com.br/trabalhe-conosco/
Thanks!Github: xptavares
Twitter: xptavares
E-mail: [email protected]
Github: jonatas
Twitter: jonatasdp
E-mail: [email protected]
shipit.resultadosdigitais.com.br/trabalhe-conosco/