简体   繁体   English

我怎样才能直接通过考试到nunit

[英]How can i pass my tests directly to nunit

I want to run C90 tests in NUnit. 我想在NUnit中运行C90测试。 I have written a short adapter that actually works, but i want to get rid of writing that adapter and instead make a tool that opens nunit and passes in loadable data so that nunit can run the tests. 我编写了一个短的适配器,该适配器实际上可以工作,但是我想摆脱编写该适配器的麻烦,而是要制作一个工具来打开nunit并传递可加载的数据,以便nunit可以运行测试。

I spare you the codeload i wrote so far and just summarize its usage: 我为您节省了到目前为止所写的代码量,并总结了其用法:

I wrtie my C90 tests as callable dll functions with annotations above them like comments. 我将C90测试写为可调用的dll函数,并在其上方带有注释(如注释)。 Example / TEST /. 示例/ 测试 /。 As of now the test returns 0 or 1 for pas fail information. 到目前为止,测试针对失败信息返回0或1。 AC# Pathinspector inspects all *.c files for annotations and extracts the loadinformation. AC#Pathinspector检查所有* .c文件中的注释,并提取loadinformation。 AC# Executer manages the execution of the tests and returns PASS/FAIL information. AC#Executer管理测试的执行并返回PASS / FAIL信息。

What i want to do instead of my Executer is to create either the Launchinformation for NUnit and pass that into a freshly created gui, or create C# code to pass into the freshly created gui. 我要执行的而不是执行程序是为NUnit创建Launchinformation并将其传递到新创建的gui中,或者创建C#代码以传递到新创建的gui中。

I know how to create an NUnit gui runner, but i dont know how to pass information into it. 我知道如何创建NUnit gui运行程序,但是我不知道如何将信息传递给它。

Nunit source is online available, however it uses a lot of singletons during initialisation so i would argue against it. Nunit源可以在线获取,但是它在初始化期间使用了很多单例,所以我会反对它。

One way could be to actually write and compile cs files and pass those compiled into nunit. 一种方法是实际编写和编译cs文件,然后将编译后的文件传递给nunit。

The best approach seems to be writing an xUnit compliant framework from scratch. 最好的方法似乎是从头开始编写与xUnit兼容的框架。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM