????UI????????????
?????????????????Android???????????????calabash???????BDD????????????????д???????????????????????????????so easy~
????????????????calabash?????????ruby?????????????????????????????ruby?Щ???????????????????????λ??????python?ɡ?????
????python??BDD??????????????????behave??lettuce?????????????behave??
?????e??????????????????ù??????behave?????????????????????????~~
????http://pythonhosted.org/behave/comparison.html

??????Phantomjs?????
??????????phantomjs????????UI???????????????selenium webdriver???????ɡ?
???????????????
?????????GUI???????????chrome??firefox??Щwebdriver?????????????
????????????????????????????????????js??css?????????????phantomjs?????
??????????linux???????????server?????UI??????
????behave?????phantomjis
from behave import *
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
def before_scenario(context??scenario):
context.dr = webdriver.PhantomJS('phantomjs'??service_args=['--ignore-ssl-errors=yes'])
context.dr.set_window_size(1360?? 900)
...
from behave import *
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.alert import Alert
@given('I open test portal')
def step_impl(context):
context.dr.get(context.index)
assert_that(context.dr.current_url??matches_regexp('7030/cas/login')??"not auth page")
...
????behave???????
@1887204
Scenario: 1887204-3
Given I open test portal
when I input username and login
then I move to release rule page
when I reset cfp cp-center log
when I reset cfp carrier-center log
then I create new release rule "autotest" "????????" "1" "diy" within "180"s
| id | equal | value |
| ?????? | = | ?й???? |
| ???? | = | lt_50m_qg_suc |
| ??????? | = | autotest |
then I check cfp cp-center log within "30"s for "release order success.*target release count:1"
...
????????????????????
???????????????????????????????????????????????~
??????????????????????????Щ???????????????????????????????????
????????????????β???????????????????behave???????case????ж??teardown??????????????????????????????????а?????????????
????????????????behave??after_scenario()?????и????????????tag??????????????
????????????work???????????????????????????UI?????????е????飬????????е????????????????????????????????????????????????
????????????docker???????????????
??????????????case????????docker?????????????????????????????£?????????????????д???????????????
??????docker????????????????PG??redis?????????????????????????С?
?????? ???????~