问题:由Selenuim Webdriver驱动的UI测试通过NodeJS平台上的Mocha执行并在AWS ECS上运行很慢,无法正常进行超时(超时= 120000 ms,即2分钟)。
设置:
{
"requiresAttributes": [
{
"value": null,
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18",
"targetId": null,
"targetType": null
},
{
"value": null,
"name": "com.amazonaws.ecs.capability.ecr-auth",
"targetId": null,
"targetType": null
}
],
"taskDefinitionArn": "someDefinition",
"networkMode": "host",
"status": "ACTIVE",
"revision": 23,
"taskRoleArn": null,
"containerDefinitions": [
{
"volumesFrom": [],
"memory": 400,
"extraHosts": null,
"linuxParameters": null,
"dnsServers": null,
"disableNetworking": null,
"dnsSearchDomains": null,
"portMappings": [
{
"hostPort": 80,
"containerPort": 80,
"protocol": "tcp"
}
],
"hostname": null,
"essential": true,
"entryPoint": [],
"mountPoints": [
{
"containerPath": "/dev/shm",
"sourceVolume": "hostDevShm",
"readOnly": null
}
],
"name": "foo-automation-container",
"ulimits": null,
"dockerSecurityOptions": null,
"environment": [],
"links": null,
"workingDirectory": null,
"readonlyRootFilesystem": null,
"image": "foo-docker-container-image",
"command": [],
"user": null,
"dockerLabels": null,
"logConfiguration": null,
"cpu": 0,
"privileged": null,
"memoryReservation": null
}
],
"placementConstraints": [],
"volumes": [
{
"host": {
"sourcePath": "/dev/shm"
},
"name": "hostDevShm"
}
],
"family": "foo-automation-tests"
}
我尝试了什么?
定义了无数次,我设置了网络模式=主机,然后我
已基于this链接添加了卷安装。
通常速度)在本地VM上托管的容器上-问题
仅适用于AWS ECS配置。
在这一点上,我撞墙了。非常感激任何的帮助。
请让我知道是否需要其他信息。
最佳答案
好的,我已经在运行它-现在所有测试都在本地硬件上以性能级别执行。这是我所做的:
在与任务关联的容器定义中:
一旦完成这些操作,UI测试就可以以其通常的速度(<1秒)绝对完美地运行。
关于docker - Selenium Mocha在AWS ECS Docker超时上进行测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46368736/