我有一个带有letsencrypt ssl证书的网站。当我对它运行代码验收测试时,测试会停止,直到我按下ctrl + z。当我对非ssl站点运行相同的测试时,没有问题。
这是我在acceptance.suite.yml中的设置。 phantomjs.cli.args参数来自此站点:http://szdredd.blogspot.de/2013/10/codeception-phantomjs-setup-for.html
<xsl:when test="../following-sibling::*[1]/PointCode[@codeLinework='none']">
<xsl:text>41</xsl:text>
<xsl:text>,</xsl:text>
</xsl:when>
我的selenium日志如下所示:
typedef void (*MENU_FUNCTION_TYPE)();
typedef enum
{
MENU_INPUT_NAV, // Menu just navigates to other menus.
MENU_INPUT_ACTION, // Menu displays the results of an action.
MENU_INPUT_NUM, // Menu take numeric input and processes it.
NUM_MENU_INPUTS
} MENU_INPUT_TYPE;
// A menu is comprised of a list of menu items which you select with the number keys.
// This structure defines a menu and the menu items it contains.
struct MENU_ITEM_TYPE;
struct MENU_TYPE
{
PGM_P text; // Pointer to text to display as menu name.
const MENU_ITEM_TYPE* menu_items; // Pointer to structures describing each menu item in this menu.
uint8_t num_items; // The number of menu item in this menu.
MENU_INPUT_TYPE type; // Specifies how this menu processes keyboard input.
};
// This structure defines a menu item and what it does when you select it.
struct MENU_ITEM_TYPE
{
PGM_P text; // Pointer to text to display as menu item name.
const MENU_TYPE* link; // Pointer to which menu selecting this menu item takes you.
MENU_FUNCTION_TYPE action; // Pointer to function that is executed when this menu item is selected.
};
extern const MENU_TYPE PROGMEM main_menu;
extern const MENU_TYPE PROGMEM todo_menu;
extern const MENU_TYPE PROGMEM todo2_menu;
extern const MENU_TYPE PROGMEM todo3_menu;
extern const MENU_TYPE PROGMEM todo4_menu;
// **************************
// "Main Menu"
const char PROGMEM main_menu_text[] = "Main Menu";
const char PROGMEM main_menu_item_text1[] = "First Menu";
const char PROGMEM main_menu_item_text2[] = "Second Menu";
const char PROGMEM main_menu_item_text3[] = "Third Menu";
const char PROGMEM main_menu_item_text4[] = "Fourth Menu";
const MENU_ITEM_TYPE PROGMEM main_menu_items[] =
{
{main_menu_item_text1, &todo_menu, NULL},
{main_menu_item_text2, &todo2_menu, NULL},
{main_menu_item_text3, &todo3_menu, NULL},
{main_menu_item_text4, &todo4_menu, NULL}
};
const MENU_TYPE PROGMEM main_menu =
{
main_menu_text,
main_menu_items,
LENGTH(main_menu_items, MENU_ITEM_TYPE PROGMEM),
MENU_INPUT_NAV
};
// **************************
// "TODO Menu"
const char PROGMEM todo_menu_text[] = "TODO Menu";
const char PROGMEM todo_menu_item_text1[] = "todo";
const MENU_ITEM_TYPE PROGMEM todo_menu_items[] =
{
{todo_menu_item_text1, &todo2_menu, NULL}
};
const MENU_TYPE PROGMEM todo_menu =
{
todo_menu_text,
todo_menu_items,
LENGTH(todo_menu_items, MENU_ITEM_TYPE PROGMEM),
MENU_INPUT_NAV
};
// **************************
// "TODO2 Menu"
const char PROGMEM todo2_menu_text[] = "TODO2 Menu";
const char PROGMEM todo2_menu_item_text1[] = "todo2";
const MENU_ITEM_TYPE PROGMEM todo2_menu_items[] =
{
{todo2_menu_item_text1, &todo3_menu, NULL}
};
const MENU_TYPE PROGMEM todo2_menu =
{
todo2_menu_text,
todo2_menu_items,
LENGTH(todo2_menu_items, MENU_ITEM_TYPE PROGMEM),
MENU_INPUT_NAV
};
// **************************
// "TODO3 Menu"
const char PROGMEM todo3_menu_text[] = "TODO3 Menu";
const char PROGMEM todo3_menu_item_text1[] = "todo3";
const MENU_ITEM_TYPE PROGMEM todo3_menu_items[] =
{
{todo3_menu_item_text1, &todo4_menu, NULL}
};
const MENU_TYPE PROGMEM todo3_menu =
{
todo3_menu_text,
todo3_menu_items,
LENGTH(todo3_menu_items, MENU_ITEM_TYPE PROGMEM),
MENU_INPUT_NAV
};
// **************************
// "TODO4 Menu"
const char PROGMEM todo4_menu_text[] = "TODO4 Menu";
const MENU_TYPE PROGMEM todo4_menu =
{
todo4_menu_text,
NULL,
0,
MENU_INPUT_NUM
};
[INFO - 2016-02-20T17:09:02.008Z] SessionManagerReqHand - _cleanupWindowlessSessions - 异步会话清理阶段现在开始 17:09:13.204 INFO - 会话7c5ef02c-9361-49c8-894d-234989179189由于客户端超时而被删除 [INFO - 2016-02-20T17:09:13.211Z] ShutdownReqHand - _handle - 即将关闭
我在这方面找到了建议,但是当我添加该配置时我出错:
class_name: AcceptanceTester
modules:
enabled: [WebDriver]
config:
WebDriver:
url: https://www.domain.de/
browser: phantomjs
谁知道如何设置代码以忽略ssl错误?任何帮助表示赞赏!
由于 乌
答案 0 :(得分:0)
为了测试我的网站,我使用Phantoman自动运行并关闭phantomJS
。在codeception.yml
我有:
config:
Codeception\Extension\Phantoman:
path: 'vendor/bin/phantomjs'
port: 4444
debug: true
ignoreSslErrors: true
sslProtocol: any
Codeception\Extension\Recorder:
delete_successful: true