使用 JAXB 生成随机实例
我使用 JABX 从大模式生成类树,然后读取/写入该模式的实例。
现在,为了保证我的应用程序的安全,我希望使用 JAXB(或其他一些工具)来生成该模式的许多随机实例,以便我可以将其提供给我的应用程序。 这样我就可以看到我的应用程序是否因某些输入数据而崩溃。
我期望 JAXB 仅具有每个节点的基数和默认值,能够为自己生成树的实例。
你认为JAXB可行吗?你还有其他想法吗?
I'm using JABX to generate a tree of classes from a big schema, and then read/write instances of this schema.
Now, to bullet-proof my application, I'd like to have JAXB (or some other tool) to generate many random instances of that schema, that I can feed in my application.
This way I would be able to see if my application crashes for some input data.
I'm expecting that JAXB, with only the cardinality and default values at each nodes, be able to generate itself an instance of the tree.
Do you think it's feasible with JAXB? Do you have other ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
XMLBeans 有这样一个工具: xsd2inst
XMLBeans has such a tool: xsd2inst