首页 > 解决方案 > Allure 尝试在 intelij idea 和 npm 中运行错误端口的报告

问题描述

我在我们的工作项目中有魅力设置。在工作中它运行良好并命令“allure generate ./allure-results -c && allure open”,生成报告并在浏览器中自动运行。但是在家里,当我运行这个命令时,它会打开一个没有互联网的浏览器页面。但是,如果我使用浏览器从 allure 文件夹中手动运行 index.html,它就可以正常工作。唯一的区别是:自动尝试在http://172.200.101.123:65249上运行,而从 ide 手动运行在 http://localhost:63342/

标签: intellij-ideanpmallure

解决方案


据我了解,默认 allure 的 ip 和端口被 windows 阻止,我不知道如何解除阻止。所以我找到了一个解决方法:告诉 allure 在 localhost 上运行报告,如下所示:

allure serve target/allure-results --host localhost --port 9999

推荐阅读