تست وب اپ ها با سلنیوم - علیرضا عظیم زاده میلانی
Post on 14-Jan-2017
274 Views
Preview:
TRANSCRIPT
Alireza Azimzadeh Milani
Author of “Practical Guide on Python Programming” and “Practical Guide on Pentesting with Kali Linux”.
Penetration-Tester, RHCE, LPIC-2, CEH, PWK, WiFu, …
3rd Python Conference, Iran, 2016
SeleniumLevel Audience: Intermediate
Concepts: What is Selenium (Se.)
Selenium Applications
Tools for Automating Interactions
Job Opportunities in The World
A demo(Tut)
Page 1
So, What is Selenium (Se.) ? Se is a browser automation framework
like as Django web framework.
Se is a set of tools for automating browsers
Se supports browsers including Firefox, Internet-Explorer, Google-Chrome, Safari, and Opera.
Page 2
Page 3
BIO:
Selenium Applications: Largely used for testing & validating applications
Automating repetitive tasks in browser
Reduce financial costs and time because teams don’t have time or money to invest in
large test teams to make sure that applications work as they are expected.
Page 4
Selenium Applications (Cont’d):
For WEB Penetration-Testing Testing logical vulnerabilities:
for Ex: authentication, access control, input validation.
Testing technical vulnerabilities: for Ex: XSS, …
Using in Web-Scraping
Page 5
Selenium Applications (Cont’d): For WEB Penetration-Testing
Hacking a logical vulnerability: BUG BOUNTY for bypassing CAPTCHA puzzle pattern:
Page 6
Thanks to:BugCrowd.comHackerONE.com
Selenium Applications (Cont’d): For WEB Penetration-Testing
Hacking a technical vulnerability: BUG BOUNTY for discovering a XSS vulnerability:
Page 7
Tools for Automating Interactions:
1. Selenium IDE:
this is a Firefox add-on
Disadvantages: - it can only be used with FF
- also, all selenium tools don’t support RIA technologies such as: Silverlight, JavaFx, and Flex/Flash.
Page 8
Tools Automating Interactions (Cont’d):
1. Selenium IDE:
Page 9
Tools Automating Interactions (Cont’d):
2. Selenium WebDriver: Is a programming interface for developing advanced
scripts using different programming languages.
We can run tests on multiple browsers that is so-called: Cross-Browser; And on multiple OS that is so-called: Cross-Platform (IOS, Android, Linux, Win, Mac, …).
Se.WebDriver offers many libraries for writing test scripts in various languages, including Java, C#, Python, Ruby, PHP, Perl, and JavaScript.
Page 10
Tools Automating Interactions (Cont’d):
2. Selenium WebDriver:
Page 11
Tools Automating Interactions (Cont’d):
3. Selenium Standalone Server:
known as “Se.Grid” and that distributes test-scripts on machines
For Se.Grid, need a Java Runtime Environment (JRE); then:
1) nohup java -jar selenium-server-standalone-2.53.jar > /root/milani/selenium.log &
2) java -jar selenium-server-standalone-2.53.jar -host 10.1.10.14 -port 4444 -role hub
Page 12
Tools Automating Interactions (Cont’d):
3. Selenium Standalone Server:
Hub: be understood as server which acts as the central point
Node: are Se.instances that are attached to the Hub which execute the tests.
Note «Se.Grid includes Hub, WebDriver, and Se.RC to execute the scripts in the Grid.
Page 13
Tools Automating Interactions (Cont’d):3. Selenium Standalone Server:
Page 14
Selenium Jobs:www.indeed.com/q-Selenium-jobs.htmlwww.naukri.com/selenium-jobs #Special for India.www.careerbuilder.com/jobs-seleniumwww.upwork.com/o/jobs/browse/skill/selenium
An example of upwork.com:Selenium script for downloading files. Hourly - Entry Level ($) - Est. Time: Less than 1 month, 10-30 hrs/week - Posted 2 days ago.
Environment: Java-based platform, Selenium/TestNG framework.
Purpose: develop a script to automate the downloading of files from different web portals. ... Each web portal (Java-based) has a completely different structure. We have ~20 user test casesusing Selenium; means: you should write a script for executing ~20 test cases.
Number of freelancers needed: 3
Page 15
Selenium Jobs (Cont’d):
Country: United States
Currency: USD
Updated: 3 April 2016
Page 16
A Practical Python Book:
Page 17
Author:Alireza Azimzadeh Milani
Publication:PendarePars
Year:2016
Link:www.pendarepars.com/Home/Search/Python
Selenium 2 Testing Tools By: David Burns, © 2012
Selenium Testing Tools Starter By: Unmesh Gundecha, © 2013
Learning Selenium Testing Tools with Python By: Unmesh Gundecha, © 2014
Selenium Testing Tools Cookbook, 2nd Edition By: Unmesh Gundecha, © 2015-----------------------------------------------------------------------------------------------------------------------------------
www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Dstripbooks&field-keywords=selenium
References:
Page 18
www.slideshare.net/videotuition/selendroid-vs-appium-mobile-test-automation-frameworks-selenium-web-driver-automation-32158263
www.installationpage.com/selenium/how-to-run-selenium-headless-firefox-in-ubuntu
www.gridlastic.com/python-code-example.html
http://testdroid.com/tech AND http://testdroid.com/testdroid
http://simeonvisser.com/posts/running-tests-in-python-with-selenium-2-and-webdriver.html
www.ibm.com/developerworks/library/wa-seleniumgrid
www.toolsqa.com/selenium-video-tutorial
Additional Training Links:
Page 19
Ali.Azimzadeh70@Gmail.com
AliAzimzadeh.Blogfa.com
IrSecTeam.org (Iran Security Team)
Any Question … ?
linkedin.com/in/alireza-azimzadeh-milani-34874079
The End of Everything is To Start Learning New Things.
top related