fix(接口测试): 插件获取不到环境信息
This commit is contained in:
parent
5054b764d8
commit
c4ffa6fa3a
|
@ -94,9 +94,11 @@ public class ApiPluginService {
|
||||||
Map<Class<? extends AbstractMsTestElement>, String> testElementPluginMap = new HashMap<>();
|
Map<Class<? extends AbstractMsTestElement>, String> testElementPluginMap = new HashMap<>();
|
||||||
List<PluginWrapper> plugins = pluginLoadService.getMsPluginManager().getPlugins();
|
List<PluginWrapper> plugins = pluginLoadService.getMsPluginManager().getPlugins();
|
||||||
for (PluginWrapper plugin : plugins) {
|
for (PluginWrapper plugin : plugins) {
|
||||||
List<Class<? extends MsTestElement>> extensionClasses = plugin.getPluginManager().getExtensionClasses(MsTestElement.class);
|
if (plugin.getPlugin() instanceof AbstractApiPlugin) {
|
||||||
|
List<Class<? extends MsTestElement>> extensionClasses = plugin.getPluginManager().getExtensionClasses(MsTestElement.class, plugin.getPluginId());
|
||||||
extensionClasses.forEach(clazz -> testElementPluginMap.put((Class<? extends AbstractMsTestElement>) clazz, plugin.getPluginId()));
|
extensionClasses.forEach(clazz -> testElementPluginMap.put((Class<? extends AbstractMsTestElement>) clazz, plugin.getPluginId()));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return testElementPluginMap;
|
return testElementPluginMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue