日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

获取input内容并回填_超详细的软件测试内容实战

發(fā)布時(shí)間:2024/9/27 编程问答 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 获取input内容并回填_超详细的软件测试内容实战 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

作者:Arnold

鏈接:

軟件測試面試?zhuanlan.zhihu.com

來源:知乎

很多人都拿到了不同的學(xué)習(xí)軟件測試學(xué)習(xí)路線圖,但是卻不知道其實(shí)軟件測試更多的需要實(shí)戰(zhàn)。
談到實(shí)戰(zhàn),我的發(fā)言比較具有權(quán)威性,很簡單,實(shí)戰(zhàn)的結(jié)果以什么維度去考慮,是不是需要對(duì)應(yīng)的輸出件。
阿里的名言:沒有結(jié)果的努力全是瞎忙!!!
那么我們來分析下,軟件測試的過程中,或者學(xué)習(xí)的過程中都需要輸出哪些內(nèi)容?第一階段,熟悉軟件測試中的各個(gè)軟件測試術(shù)語的相關(guān)概念。

第二階段,輸出對(duì)應(yīng)的軟件測試方法及分類

第三階段,軟件測試的相關(guān)模型。

第四階段,輸出軟件測試生命周期

第五階段,需求評(píng)審,企業(yè)的第一個(gè)會(huì)議

第六個(gè)階段,測試用例的輸出

第七個(gè)階段:Linux相關(guān)命令

第八個(gè)階段:數(shù)據(jù)庫的相關(guān)練習(xí)一、where子句練習(xí)
1.查找滿足價(jià)格大于等于9的所有信息;

2.查找滿足product_id在1002和1003之間的;

3.查找user_id在1、3、5這三個(gè)數(shù)內(nèi)的信息;

4.查找訂單狀態(tài)是已支付的信息;

5.查找用戶名類似于li開頭的信息;

6.查找用戶名中第二個(gè)字母是h的信息;

7.查找用戶名中第二個(gè)字母不是h的信息;

8.查找用戶名中最后一個(gè)字母不是以i結(jié)尾的信息;

9.查找價(jià)格大于8,且訂單狀態(tài)是已支付的信息;

10.查找用戶表中user_nick為null的信息;

11.查找用戶表中user_nick不為null的信息。

二、聚合函數(shù)練習(xí)
1.查找訂單表中最大的價(jià)格;查找訂單表中最小的價(jià)格;

2.查找訂單表中user_id=2的最小價(jià)格;

3.分別列出訂單表中user_id=2的最小價(jià)格和最大價(jià)格;

4.分別列出訂單表中user_id=2的最小價(jià)格和最大價(jià)格,并把最小價(jià)格的展示結(jié)果的列名改為“min_price”;

5.求訂單表的價(jià)格的平均值,求訂單表中user_id=2的價(jià)格的平均值;

6.分別列出訂單表中user_id=2的價(jià)格的平均值、最小值、最大值;

7.求訂單表中user_id=1的價(jià)格的總和;

8.求訂單表中user_id=1或者user_id=3的價(jià)格總和;

第九個(gè)階段:探索式測試

第十階段:Python相關(guān)實(shí)戰(zhàn)1.提醒用戶輸入自己的英文名字,然后保存到字典中(以name為key),將用戶輸入的英文名字翻轉(zhuǎn),繼續(xù)保存到剛才的字典中(以new_name為key)將字典中用戶的正常的英文姓名賦值給變量real_name,告知客戶“您的英文名字是:” + 變量,“您的英文名字翻轉(zhuǎn)是:” + 字典里獲取;
dict_user={} real_name=input('請(qǐng)輸入你的英文名字:') dict_user['name']=real_name dict_user['new_name']=real_name[::-1] print("你的英文名字是:"+real_name,"你的英文名字翻轉(zhuǎn)是:"+dict_user['new_name'])

2.提醒用戶依次輸入數(shù)學(xué)、語文、英語、綜合四門的成績,按照輸入的成績排序,告訴用戶“您的最高的一門成績是:”xx (不用告訴用戶是哪一科)1)方法一:
score=[float(input('請(qǐng)輸入你的數(shù)學(xué)成績:')),float(input('請(qǐng)輸入你的語文成績:')),float(input('請(qǐng)輸入你的英文成績:')),float(input('請(qǐng)輸入你的綜合成績:'))] sorted_score=sorted(score,reverse=True) print('你的最高一門成績是:%d'%sorted_score[0])

2)方法二:
subjects=['數(shù)學(xué)','語文','英語','綜合'] score=[] for subject in(subjects): single_score=float(input('請(qǐng)輸入你的%s成績:' %subject)) while single_score>100 or single_score<0: single_score=float(input('輸入錯(cuò)誤,請(qǐng)重新輸入你的%s成績:' %subject)) score.append(single_score) sorted_score=sorted(score,reverse=True) print('你的最高一門成績是:%d' %sorted_score[0])

3)方法三:
subjects=['數(shù)學(xué)','語文','英語','綜合'] dict_score={} for subject in(subjects): score=(float(input('請(qǐng)輸入你的%s成績:' %subject))) while score>100 or score<0: score=float(input('輸入有誤,請(qǐng)重新輸入你的%s成績:'%subject)) dict_score['%s' %subject]=score max_score=max(zip(dict_score.values())) print('你最高一門的成績是:%s' %max_score)

3.使用input讓用戶依次輸入兩個(gè)數(shù)字, 計(jì)算兩個(gè)數(shù)字的和并顯示。
a=float(input('請(qǐng)輸入第一個(gè)數(shù)字:')) b=float(input('請(qǐng)輸入第二個(gè)數(shù)字:')) print('兩個(gè)數(shù)字之和是:%s' %(a+b))

1.用python輸出九九乘法表
for i in range(1,10): for j in range(1,i+1): print('%dx%d=%d ' %(j,i,j*i),end='') print()

2.猜數(shù)字游戲
代碼中生成一個(gè)隨機(jī)整數(shù),然后用戶輸入數(shù)字后,程序提示用戶的輸入是高了還是低了,直到用戶猜中這個(gè)數(shù)字, 游戲結(jié)束。
import random a=random.randint(0,100) b=int(input('請(qǐng)輸入你猜的數(shù)字:')) while b!=a: if b>a: b=int(input('你猜高了,請(qǐng)重新猜這個(gè)數(shù)字:')) else: b=int(input('你猜低了,請(qǐng)重新猜這個(gè)數(shù)字:')) else: print('你猜對(duì)了,游戲結(jié)束')

第十二階段:自動(dòng)化測試

from selenium import webdriver #從selenium導(dǎo)入webdriver這個(gè)類import time
driver = webdriver.Chrome() #初始化一個(gè)driver對(duì)象
driver.get(' http://101.133.169.100/yuns/')
time.sleep(5)#xpath絕對(duì)路徑#登錄
driver.find_element_by_xpath('/html/body/div[1]/div/div[1]/a[1]').click()#免費(fèi)注冊(cè)
driver.find_element_by_xpath('/html/body/div/div/div[1]/a[2]').click()#全場免運(yùn)費(fèi)
driver.find_element_by_xpath('/html/body/div/div/div[2]/span[1]').click()#優(yōu)惠券
driver.find_element_by_xpath('/html/body/div[3]/div/div/a[3]').click()#我的訂單搜索框
driver.find_element_by_xpath('/html/body/div/div/div/form/div/div/input[1]').send_keys('男鞋')#xpath相對(duì)路徑#登錄
driver.find_element_by_xpath("//div[@class='login']/a[1]").click()
driver.find_element_by_xpath("//*[@class='login']/a[1]").click()#更好留給你
driver.find_element_by_xpath("//div[@class='schhot']/a[6]").click()
driver.find_element_by_xpath("//a[contains(@title,'更好')]").click()
driver.find_element_by_xpath("//*[@class='schhot']").click()
driver.find_element_by_xpath("//a[@title='更好留給你']").click()#我的訂單搜索框
driver.find_element_by_xpath("//div[@class='sch']/input[1]").send_keys('男鞋')
driver.find_element_by_xpath("//*[@class='sch']/input[1]").send_keys('男鞋')
driver.find_element_by_xpath("//input[@class='text' and @type='text']").send_keys('男鞋')
driver.find_element_by_xpath("//input[contains(@name,'key')]").send_keys('男鞋')#服務(wù)時(shí)間
driver.find_element_by_xpath("//div[@class='contact_us']/p[3]").click()
driver.find_element_by_xpath("//*[@class='contact_us']/p[3]").click()
driver.find_element_by_xpath("//p[@class='service']").click()
driver.find_element_by_xpath("//p[contains(@class,'serv')]").click()#個(gè)人頭像
driver.find_element_by_xpath("//div[@class='img']/img").click()
driver.find_element_by_xpath("//*[@class='img']/img").click()
driver.find_element_by_xpath("//img[@width='80']").click()
driver.find_element_by_xpath("//img[contains(@src,'/yuns/')]").click()#css定位#首頁輸入框
driver.find_element_by_css_selector("html body div div div div form input:nth-child(1)").send_keys('襯衫')#購物車
driver.find_element_by_css_selector("div.small_cart_name>span").click()#首頁輸入框
driver.find_element_by_css_selector("input.but1").send_keys('襯衫')#我的訂單搜索按鈕
driver.find_element_by_css_selector("input[type='submit']").click()#在線支付
driver.find_element_by_css_selector("div.contact_help>dl:nth-child(4)>dd:nth-child(2)>a").click()#我的購物車數(shù)字圖標(biāo)
driver.find_element_by_css_selector("i#cart_num").click()#會(huì)員中心
driver.find_element_by_css_selector('div[class="con"]>p>a:nth-child(1)').click()#整點(diǎn)秒殺按鈕
driver.find_element_by_css_selector('a[target="_blank"][href="http://101.133.169.100/yuns/index.php/goods/seckill"]').click()獲取驗(yàn)證信息from selenium import webdriver #從selenium導(dǎo)入webdriver這個(gè)類import time
driver = webdriver.Chrome() #初始化一個(gè)driver對(duì)象
driver.get(' http://101.133.169.100/yuns/')
time.sleep(5)
title = driver.title #獲取頁面title信息
print(title)
driver.find_element_by_link_text('口紅').click()
url = driver.current_url #點(diǎn)擊某一按鈕之后,獲取當(dāng)前頁面信息的url
print(url)控制瀏覽器
from selenium import webdriver #從selenium導(dǎo)入webdriver這個(gè)類
import time
driver = webdriver.Chrome() #初始化一個(gè)driver對(duì)象
driver.get(' http://101.133.169.100/yuns/')
time.sleep(5)
driver.find_element_by_link_text('口紅').click()
driver.refresh() #瀏覽器刷新
time.sleep(2)
driver.back() #瀏覽器回退
time.sleep(2)
driver.forward() #瀏覽器前進(jìn)
time.sleep()設(shè)置瀏覽器尺寸
from selenium import webdriver #從selenium導(dǎo)入webdriver這個(gè)類 import time driver = webdriver.Chrome() #初始化一個(gè)driver對(duì)象 driver.get(' http://101.133.169.100/yuns/') time.sleep(5) driver.maximize_window() #瀏覽器窗口最大化 time.sleep(2) driver.set_window_size(1200,800) #設(shè)置瀏覽器的高和寬 time.sleep(2)動(dòng)作方法
from selenium import webdriver #從selenium導(dǎo)入webdriver這個(gè)類 import time driver = webdriver.Chrome() #初始化一個(gè)driver對(duì)象 driver.get(' http://101.133.169.100/yuns/') time.sleep(5) driver.find_element_by_name('key').send_keys('口紅') #輸入內(nèi)容,只針對(duì)輸入框 time.sleep(2) driver.find_element_by_name('key').clear() #清空輸入框的內(nèi)容 time.sleep(2) driver.find_element_by_id('cart_num').click() #點(diǎn)擊控件窗口切換
from selenium import webdriver #從selenium導(dǎo)入webdriver這個(gè)類 import time driver = webdriver.Chrome() #初始化一個(gè)driver對(duì)象 driver.get('http://www.baidu.com') time.sleep(5) driver.find_element_by_class_name('s_ipt').send_keys('騰訊視頻') driver.find_element_by_id('su').click() print(driver.window_handles) #獲取當(dāng)前窗口所有信息 driver.find_element_by_xpath("//div[@id='1']/h3/a[1]").click() print(driver.window_handles) print(driver.current_window_handle)# 獲取當(dāng)前焦點(diǎn)所在的窗體 driver.switch_to.window(driver.window_handles[1]) #切換窗體的焦點(diǎn) driver.close() #關(guān)閉當(dāng)前焦點(diǎn)所在的窗體 driver.quit() #關(guān)閉所有窗體
自動(dòng)化測試報(bào)告

第十三階段:移動(dòng)端自動(dòng)化

第十四階段:接口測試

性能測試

第十五階段:接口自動(dòng)化測試

總結(jié)

以上是生活随笔為你收集整理的获取input内容并回填_超详细的软件测试内容实战的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。