Commit 2a2310d8 authored by libin's avatar libin
Browse files

20190819

parent 797f172b
/evnv
/.svn
/.idea
This diff is collapsed.
#coding:utf_8
ENV = "testsmartworkspace294"
ENV = "testautoworkspace"
MANAGE_URL = "http://"+ENV+".rd.virsical.cn/manage/"
CLIENT_URL = "http://"+ENV+".rd.virsical.cn/client/"
......@@ -22,7 +22,7 @@ SER_PASSWD = "wafer.com"
SER_PORT = '22'
COMPANY_NAME = "autotest"
COMPANY_URL = "autotest.com"
COMPANY_ID = "65"
COMPANY_ID = "10"
COMPANY_URL_NEW = "autotest2.com"
COMPANY_URL_EMPTY = "waferxa.com"
......@@ -316,7 +316,7 @@ BUILD_UPLOAD_FILE_PATH="\\img\\AIO_machine.jpg"
PRE_ATTRIBUTE_VALUE = 'value'
PRE_ATTRIBUTE_TITLE = 'title'
PRE_PARK_NAME = "西安软件园"
PRE_PARK_ID = "475"
PRE_PARK_ID = "3"
PRE_TIMEZONE = '北京'
PRE_CITY = "中国 / 陕西省 / 西安市"
PRE_MORNING_START_TIME = "09:00"
......@@ -330,27 +330,27 @@ PRE_ALL_DAY_END = "18:00"
预置的部门数据
'''
PRE_DEPARTMENT_NAME = "产品测试部"
PRE_DEPARTMENT_ID = "2611"
PRE_DEPARTMENT_FATHER_ID = "496"
PRE_DEPARTMENT_ID = "111"
PRE_DEPARTMENT_FATHER_ID = "110"
'''预置的楼宇数据'''
PRE_BUILD_NAME ="零壹广场"
PRE_BUILD_ID ="18"
PRE_BUILD_ID ="3"
PRE_BUILD_BUILDTOKEN ="autotest001"
'''预置楼层信息'''
PRE_FLOOR_NAME = "3"
PRE_FLOOR_ID = "15"
PRE_FLOOR_ID = "2"
'''预制区域信息'''
PRE_AREA_NAME = "东区"
PRE_AREA_ID = "28"
PRE_AREA_ID = "3"
'''
预置的用户数据
'''
PRE_USER_NAME = "autotest"
PRE_USER_ID = "1696"
PRE_USER_ID = "379"
PRE_USER_JOB_NUMBER = "autotest"
PRE_USER_CARD_NUMBER = "autotest"
PRE_USER_EMAIL = "at@autotest.com"
......@@ -361,7 +361,7 @@ PRE_USER_WORKSTATION_NUMBER = "FS001"
'''
系统默认的角色数据
'''
COMMON_USER_ROLE_ID = "231"
COMMON_USER_ROLE_ID = "34"
COMMON_USER_ROLE_NAME = u"普通用户"
COMMON_USER_DEPARTMENT = u"所有部门"
COMMON_USER_MENU = '{"backMenu":"1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,44,48,50,51,52,53,54,55,56,57,58","webMenu":"30,31,32,33,34,35,36,37,38,39,40,42,43,46,47,53"}'
......@@ -369,7 +369,7 @@ COMMON_USER_SCOPES = '{"scopes":[{"scopeType":-1,"tableIds":0}]}'
COMMON_USER_ROLEURL = '1,2,3,4,5,6,7,8,11,13,15,16,17,18,19,20,21,22,26,27,28,29,31,32,33,34,35,36,37,38,39,45,46,50,51,52,53,55,57,58,62,63,64,65,66,67,68,69,70,71,90,91,92,93,94,98,99,100,101,102,106,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133'
COMMON_USER_RANGE = "Pre_Xi'an_SoftWare_Park"
SPECIAL_USER_ROLE_NAME = u"特殊预约用户"
SPECIAL_USER_ROLE_ID = "232"
SPECIAL_USER_ROLE_ID = "35"
SPECIAL_USER_DEPARTMENT = u"所有部门"
SPECIAL_USER_MENU = '{"backMenu":"1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,44,48,50,51,52,53,54,55,56,57,58","webMenu":"30,31,32,33,34,35,36,37,38,39,40,42,43,46,47,53"}'
SPECIAL_USER_SCOPES = '{"scopes":[{"scopeType":-1,"tableIds":0}]}'
......@@ -377,8 +377,8 @@ SPECIAL_USER_ROLEURL = '1,2,3,4,5,6,7,8,11,13,15,16,17,18,19,20,21,22,26,27,28,2
SPECIAL_USER_RANGE = "Pre_Xi'an_SoftWare_Park"
'''预置的工位数据'''
PRE_MOBILE_STATION_ID = "2456"
PRE_FIXED_STATION_ID = "2457"
PRE_MOBILE_STATION_ID = "89"
PRE_FIXED_STATION_ID = "90"
PRE_MOBILE_STATION_NAME = "PM001"
PRE_FIXED_STATION_NAME = "PF001"
PRE_STATION_PARK = PRE_PARK_NAME
......
......@@ -14,4 +14,4 @@ MATERIAL_X_Decrease = ".clearfix .p:nth-child(2) [aria-label='Decrease Value']"
MATERIAL_Y_Increase = ".clearfix .p:nth-child(3) [aria-label='Increase Value']"
MATERIAL_Y_Decrease = ".clearfix .p:nth-child(3) [aria-label='Decrease Value']"
MATERIAL_TEXT =".material_pic text"
EDIT_MATERIAL = "tbody tr:nth-child(3) td:last-child a:first-child"
\ No newline at end of file
EDIT_MATERIAL = "div.ant-table-fixed-right tr:nth-child(3) td:last-child a:first-child"
\ No newline at end of file
This diff is collapsed.
import threading
import time
from src.common import mysql_client
from src.datalib import test_data
......@@ -6,22 +7,36 @@ from src.module import deal_db_data
from socket import *
def tcplink(sock,info):
print(info)
sock.send("CRSTSE0A0501PTTC\n".encode())
print(info,"----已发送")
def tcprec(sock,info):
while True:
recvData = sock.recv(1024)
if recvData:
print("接收到数据:", recvData.decode())
print(threading.currentThread().getName(),info,"接收到数据:", recvData.decode())
else:
break
def tcplink(sock,info):
# print(info)
# sock.send("CRSTSE0A0501PTTC\n".encode())
# print(threading.currentThread().getName(),info,"----已发送")
# while True:
# recvData = sock.recv(1024)
# if recvData:
# print("接收到数据:", recvData.decode())
# else:
# break
t1=threading.Thread(target=tcprec, args=(sock,info))
t1.start()
while True:
sock.send("CRSTSE0A0501PTTC\n".encode())
print(threading.currentThread().getName(),info, "----已发送")
time.sleep(30)
sock.close()
serverSocket = socket(AF_INET, SOCK_STREAM)
serverSocket.bind(("", 8080))
serverSocket.listen(5)
serverSocket.bind(("", 49999))
serverSocket.listen(10)
print("----------开始----------")
while True:
clientSocket, clientInfo = serverSocket.accept()
......
from src.datalib import test_data
from src.module import deal_db_data
deal_db_data.clear_park()
insert_park = '''INSERT INTO `park`(allDay,amTime,city,country,domainID,parkName,parkStatus,pmTime,province,timeZone,cityName,countryName,provinceName,timeAreaName)
VALUES('01:40-18:40','01:40-12:40','beijing','china',{di},'中关村',0,'14:40-18:40','beijing','Asia/Shanghai','北京市','中国','北京市','北京');'''.format(
di=test_data.COMPANY_ID)
deal_db_data.execute_sql(insert_park)
\ No newline at end of file
#coding:utf-8
import random
from src.datalib import test_data
from src.elementlib import administrator
from src.module import login_swp
from src.module import login_swp, deal_db_data
import unittest
from src.common import web_client
from src.common import web_client, mysql_client
from selenium.webdriver.common.by import By
class PageTurning(unittest.TestCase):
def setUp(self):
#确保有第二页出现
sql_obj = mysql_client.MySQLClient(test_data.MYSQL_IP, test_data.MYSQL_PORT, test_data.MYSQL_NAME, \
test_data.MYSQL_PASSWD, test_data.MYSQL_DB_RESERVESTATION)
sql_obj.connectdb()
sql_obj.executeSQL(r"SELECT COUNT(*) FROM `domain` WHERE domainStatus=0")
result = sql_obj.result[0][0]
while result < 11:
sql_obj.executeSQL(r'''INSERT INTO `domain`(canceTime,delayedTime,domainName,domainStatus,domainUrl,fixedColor)
VALUES(30,30,'%s',0,'%s',0)''' % (random.choice('abcdefgh', 4), random.choice('abcdefgh', 4) + ".com"))
sql_obj.commitSQL()
result = result + 1
sql_obj.close_connect()
self.object = web_client.WebClient(test_data.MANAGE_URL)
login_swp.login01(self.object,test_data.SUPERADMIN_NAME,test_data.SUPERADMIN_PW,test_data.HOME_PAGE_SUPERADMIN_NAME) #超级管理员登陆
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment