mirai/mirai-console/backend/integration-test
Eritque arcus 4408750847
mark plugin disabled when it throw exception during enable process (#2022)
* Fix bootstrap when no env specified

* add PluginWithExceptionTest

* Add exceptedExceptionMessage in MCIT(Throwable or Exception may not work?)

* Using red color show disabled plugins in /status command

* Catch exception during enable process

* Count plugins without disabled plugins

* Revert "Fix bootstrap when no env specified"

This reverts commit ff9bb180fd6687c5da27b8a38da2658a1b26ad93.

* format

* format

* halt plugin enable process when mirai failed to enable it dependencies.

* Update mirai-console/backend/mirai-console/src/internal/plugin/PluginManagerImpl.kt hint

Co-authored-by: Him188 <Him188@mamoe.net>

* rename tmp to dependsOn

* Revert changes of PluginManagerImpl

* Plugin callback executions assertions

* Improve & Fix Logic

* Fix PluginDependOnErrorPlugin

* Update err msg

* move dependencies check from JvmPluginInternal.kt to BuiltInJvmPluginLoaderImpl.kt

* typo

* don't throw err caused by dependencies fail

Co-authored-by: Him188 <Him188@mamoe.net>
Co-authored-by: Karlatemp <kar@kasukusakura.com>
2022-06-13 19:45:39 +01:00
..
src mark plugin disabled when it throw exception during enable process (#2022) 2022-06-13 19:45:39 +01:00
test mark plugin disabled when it throw exception during enable process (#2022) 2022-06-13 19:45:39 +01:00
testers Fix build 2022-05-24 18:10:18 +08:00
build.gradle.kts console IT: Do not delete entire test sandbox, keep libraries 2022-04-24 16:15:17 +01:00
README.md Update docs for console IT 2022-04-24 15:45:58 +01:00

Console - Integration Test

Mirai Console 一体化测试单元 (目前仅内部测试)


使用 Integration Test Framework

TODO

添加一个新测试

创建 Integration Test 测试点

创建一个新的子测试单元并继承 AbstractTestPoint

  • 在其 beforeConsoleStartup() 准备测试环境 (如写入配置文件, etc)
  • 在其 onConsoleStartSuccessfully() 检查插件相关行为是否正确

然后在 MiraiConsoleIntegrationTestLauncher.points 添加新单元的完整类路径


Mirai Console Internal Testing

添加一个新测试 (CONSOLE 内部测试)

test/testpoints 添加新测试点, 然后在 MiraiConsoleIntegrationTestBootstrap.kt 添加相关单元

创建配套子插件

testers 创建新的文件夹, 刷新 Gradle 即可获得生成的 build.gradle.kts. 即可创建新的配套插件, 可用于测试插件依赖, etc

只有在修改 build.gradle.kts 后才需要将其添加 git, 其他情况下会自动生成.