我有一个使用chimp运行摩卡testing的node.js应用程序,在我的本地操作系统中运行时,它正常工作。 它使用Google Chrome进行UItesting。 目前,我是dockerizing这个应用程序…但是,我不确定我需要什么来运行在浏览器方面的uitesting。 我使用了https://github.com/workflow/docker-chimp/blob/master/Dockerfile中的一些命令来安装无头Chrome浏览器。 我的testing在“最终”挂钩上失败…但我不知道这是什么,也不知道为什么会发生。testing通常在主机操作系统中运行。 > pluto_integ_test@1.0.0 test /PlutoD2D/itest > chimp –mocha [chimp] Running… 1) "before all" hook 0 passing (1m) 1 failing 1) "before all" hook: Error: timeout of 60000ms exceeded. Ensure the done() callback is being called in this test Mocha failed npm ERR! Test failed. See above for more details. 我怎样才能找出问题所在?
问题:在 NodeJS平台上运行并在AWS ECS上运行的Selenuim Webdriver驱动的通过Mocha执行的UItesting对于例行超时(超时= 120000 ms,即2分钟)而言速度很慢。 build立: 我在AWS ECS上有一个集群。 群集有3个m4.xlarge实例,所以CPU /内存不是问题。 此外,EC2实例度量标准显示,即使运行testing,CPU /内存使用率也<1%。 每个容器都使用以下JSON定义: { "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, […]