HTML5 Training

Download Report

Transcript HTML5 Training

Automated tests on
Drupal
Ran Bar-Zik/ 09 10, 2014
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Who am I?
Ran Bar-Zik
Software Developer at HP Software R&D
Working at HP Live Network project – based on Drupal.
My professional site: internet-israel.com
Contact me at:
Twitter: @barzik
Facebook: facebook.com/rbarzik
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Why do we need automated testing?
Bug reports after a new release:
3
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Automated tests solutions:
Selenium + Jenkins:
SimpleTest:
QTP:
4
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
JasmineJS
behavior-driven development framework for testing JavaScript code
It can be used for testing web component and not only JavaScript.
5
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Expanding Box
My jQuery example module:
Demo link:
Github link:
6
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
JasmineJS Install
7
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Specrunner.htm
The tests results will be here, but nothing to see here actually.
8
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Jasmine test file for expanding box
9
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Running Tests in Jasmine SA
Just go to specrunner.html
Test link:
10
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Jasmine Drupal Integration
Module for integration between Jasmine and Drupal
Available at Github:
Live Demo:
11
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Drupal Jasmine definitions
12
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Drupal Jasmine Integration manifest
13
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Playing drush command for Jasmine Drupal
Integration
14
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Thank you
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.