Share Testing Experience and Selenium.docx

上传人:b****2 文档编号:24517973 上传时间:2023-05-28 格式:DOCX 页数:14 大小:1.62MB
下载 相关 举报
Share Testing Experience and Selenium.docx_第1页
第1页 / 共14页
Share Testing Experience and Selenium.docx_第2页
第2页 / 共14页
Share Testing Experience and Selenium.docx_第3页
第3页 / 共14页
Share Testing Experience and Selenium.docx_第4页
第4页 / 共14页
Share Testing Experience and Selenium.docx_第5页
第5页 / 共14页
点击查看更多>>
下载资源
资源描述

Share Testing Experience and Selenium.docx

《Share Testing Experience and Selenium.docx》由会员分享,可在线阅读,更多相关《Share Testing Experience and Selenium.docx(14页珍藏版)》请在冰豆网上搜索。

Share Testing Experience and Selenium.docx

ShareTestingExperienceandSelenium

ShareTestingExperienceandSelenium

1.Introduction

Sharethetestingexperience,selenium+VisualStudio

2.TestingExperience

2.1TestProcess

(1)RequirementMeeting:

Reviewrequirementdocument,attendthemeetingwithquestions

(2)TestPlan:

Person,Time,TestEnvironment

(3)TestCase:

Accordingtotherequirementdocument,writetestcase.Tool:

TTP

(4)ReviewTestCase:

ProductManager,Developer,Testers

(5)Deliverytotest:

Developersdeliverythecodes,testersdeploythetestenvironment

(6)TestProduct:

Accordingtothecase,finishthetestintheplantimeineachenvironment;Bugs;Dailyreport

(7)RegressionTesting:

Beforeandafterproductonline,testthemainfunctionsoftheproduct

(8)Summary:

Sharenewfunctionsandbugsintheteams

2.2TestCase

Tool:

TTP

Content:

Summary,Product,CaseID,Component,EstimatedrunTime,Description,TestEnvironment,Preconditions,Steps,ExpectedResult

2.3BugManagement

2.3.1Description

(1)Summary:

shortandcleardescription

(2)Product:

Projectname,e.g.CAD3.0

(3)Component:

amoduleintheproduct,e.g.NCIC,CFS,Map

(4)Priority:

Block,P1,P2,P3

(5)Severity:

Low,Medium,High

(6)EnterBy

(7)AssignTo

(8)TestEnvironment:

Browser/System/JRE

(9)Steps:

Preconditions,Steps,ActualResult,ExpectedResult

(10)Attachment:

pictures,documents,videos

(11)LinktoTestCase/TestRun

2.3.2Status

(1)New->Fix(Developer)->VerifyPending->Closed/Reopen(Tester)

(2)New->CannotReproduce(Developer)->VerifyCNR/Reopen(Tester)

(3)New->AsDesigned(Developer)->CloseAsDesign/Reopen

2.4WebTesting

(1)PageElements:

Inputbox(characters,numbers,specialcharacters,Double-bytecharacters),Dropdown,Radiobutton,Checkbox,DateTimePicker,Buttons,Links

(2)Searchfunction:

criteria,result

(3)Add/edit/delete

(4)Upload/download

(5)Back

(6)Enter

(7)Refresh

(8)URL

(9)UI/Usability

(10)Compatibility:

Browser(IE/Chrome/Firefox/Safari)/System

(11)Businessprocess/workflow

(12)Interfacetesting

(13)Securitytesting

(14)Performancetesting

3.Selenium+VisualStudio

Introducetheautomatictestingtool–Selenium

3.1Selenium

(1)Introduce

ØIDE:

AFirefoxadd-onthatwilldosimplerecord-and-playbackofinteractionswiththebrowser.

ØWebDriver:

createrobust,browser-basedregressionautomationsuitesandtests;scaleanddistributescriptsacrossmanyenvironments.

(2)Download

(3)IEDriverServer.exe32bit/64bit

(Afterdownloadit,putitintheC:

\ProgramFiles\InternetExplorer)

Chromedriver.exe

(IfuseChrome,alsoneedputittotheChromeinstallfile)

3.2VisualStudio

IntroducehowtoconfiguretheseleniumintheVisualStudio

3.2.1CreateNewProject

1.CreateConsoleApplicationprojectorUnitTestProject

3.2.2AddReference

RightclicktheReferencesintheproject,addtheseleniumDLLfile.

3.2.3AddUsing

usingOpenQA.Selenium;

usingOpenQA.Selenium.Support.UI;

usingOpenQA.Selenium.IE;

usingOpenQA.Selenium.Chrome;

usingOpenQA.Selenium.Firefox;

3.2.4LocateElement

Whenlocatethepageelements,thereareseveralwaystolocatethem.Iintroducethreecommonways.

(1)ID

driver.FindElement(By.Id("txtUserName")).SendKeys("sa01");

(2)Name

driver.FindElement(By.Name("btnLogin")).Click();

(3)XPath

driver.FindElement(By.XPath("//a[contains(.,‘MyActiveCases')]")).Click();

3.3Settings/Summary

(1)ChooseIE

TwowaystolaunchtheIEbrowser:

IWebDriverdriver=newInternetExplorerDriver("C:

\\ProgramFiles\\InternetExplorer");

IWebDriverdriver=newInternetExplorerDriver();

(2)SettingtheIEzoomto100%,andthesettingsintheSecuritykeepconsistent.

(3)Frame

Inoursites,mostofpagesareinaframe,soweneedswitchtotheframe,thenlocatethepageelement

driver.SwitchTo().Frame("main");

Note:

iftheframehasIDorName

locateFrame=driver.FindElement(By.Xpath(“//frame[@classname='main']”))

driver.driver.SwitchTo().Frame(locateFrame);

Note:

theframenoNameorID,useotherparameters

(4)Whenweusetheselenium,weneednoticethattheversionforSelenium,IE

IE11needusetheselenium3.0oraboveversion

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工程科技 > 机械仪表

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1