• <small id='1RF1A'></small><noframes id='1RF1A'>

    <legend id='1RF1A'><style id='1RF1A'><dir id='1RF1A'><q id='1RF1A'></q></dir></style></legend>

      <i id='1RF1A'><tr id='1RF1A'><dt id='1RF1A'><q id='1RF1A'><span id='1RF1A'><b id='1RF1A'><form id='1RF1A'><ins id='1RF1A'></ins><ul id='1RF1A'></ul><sub id='1RF1A'></sub></form><legend id='1RF1A'></legend><bdo id='1RF1A'><pre id='1RF1A'><center id='1RF1A'></center></pre></bdo></b><th id='1RF1A'></th></span></q></dt></tr></i><div id='1RF1A'><tfoot id='1RF1A'></tfoot><dl id='1RF1A'><fieldset id='1RF1A'></fieldset></dl></div>

        <tfoot id='1RF1A'></tfoot>
        • <bdo id='1RF1A'></bdo><ul id='1RF1A'></ul>

        命令行自动化——期望等效

        时间:2023-09-17

        <legend id='nqOwO'><style id='nqOwO'><dir id='nqOwO'><q id='nqOwO'></q></dir></style></legend>
          <bdo id='nqOwO'></bdo><ul id='nqOwO'></ul>
          <tfoot id='nqOwO'></tfoot>
          <i id='nqOwO'><tr id='nqOwO'><dt id='nqOwO'><q id='nqOwO'><span id='nqOwO'><b id='nqOwO'><form id='nqOwO'><ins id='nqOwO'></ins><ul id='nqOwO'></ul><sub id='nqOwO'></sub></form><legend id='nqOwO'></legend><bdo id='nqOwO'><pre id='nqOwO'><center id='nqOwO'></center></pre></bdo></b><th id='nqOwO'></th></span></q></dt></tr></i><div id='nqOwO'><tfoot id='nqOwO'></tfoot><dl id='nqOwO'><fieldset id='nqOwO'></fieldset></dl></div>

            1. <small id='nqOwO'></small><noframes id='nqOwO'>

                    <tbody id='nqOwO'></tbody>
                • 本文介绍了命令行自动化——期望等效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有一个命令行工具,我们需要为其编写自动化测试.我们的测试框架是用 C# 编写的,我正在寻找可以让我进行自动化的 .NET 库(我知道我可以使用 Process 类;重定向 IO;进行验证,但我不想重新发明轮子如果可能的话).理想情况下,我正在寻找类似 expect 库的东西.有什么建议吗?

                  There is a command line tool for which we need to write automated tests. Our test framework is written in C# and I was looking for .NET libraries which would let me do the automation (I know I can use the Process class; redirect the IO; do the validation, but I don't want to reinvent the wheel if possible). Ideally I'm looking for something like an expect library. Any suggestions?

                  推荐答案

                  我意识到这是一个老问题,但没有人回答.

                  I realize that this is an old question, but no one has answered.

                  IMO,每次我这样做时,我总是不得不重新发明轮子(即处理类、重定向 StdIO、StdErr 等并解析输出).想一想,我为此目的重用了一个抽象基类.

                  IMO, I've always had to reinvent the wheel every time I've done this (i.e. Process class, redirect StdIO, StdErr, etc and parse the output). Thought, I've reused an abstract base class for this purpose.

                  也许其他人知道有一个图书馆可以做到这一点,但我不知道.

                  Maybe someone else knows of a library to do this, but i do not.

                  但是我会发出警告,我已经看到在 .Net 框架中并不总是正确处理重定向 IO 的情况(取决于程序如何写入 stdio 或 stderr,是否隐藏窗口,如果您是多线程和其他一些条件)会导致争用条件,从而导致无限期挂起.

                  However I will give a warning that I have seen cases where redirecting the IO is not always properly handled in the .Net framework (depending on how the program writes to stdio or stderr, if you're hiding the window or not, if you're multi-threading, and a few other conditions) leading to a race condition that results in an indefinite hang.

                  这篇关于命令行自动化——期望等效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何使用自动化脚本在一天中的不同时间测试我的 Web 应用程序的性能? 下一篇:如何对与 VS DOM 交互的 Visual Studio 插件进行单元测试

                  相关文章

                  <tfoot id='BJCml'></tfoot>
                    <bdo id='BJCml'></bdo><ul id='BJCml'></ul>

                • <i id='BJCml'><tr id='BJCml'><dt id='BJCml'><q id='BJCml'><span id='BJCml'><b id='BJCml'><form id='BJCml'><ins id='BJCml'></ins><ul id='BJCml'></ul><sub id='BJCml'></sub></form><legend id='BJCml'></legend><bdo id='BJCml'><pre id='BJCml'><center id='BJCml'></center></pre></bdo></b><th id='BJCml'></th></span></q></dt></tr></i><div id='BJCml'><tfoot id='BJCml'></tfoot><dl id='BJCml'><fieldset id='BJCml'></fieldset></dl></div>
                • <small id='BJCml'></small><noframes id='BJCml'>

                    1. <legend id='BJCml'><style id='BJCml'><dir id='BJCml'><q id='BJCml'></q></dir></style></legend>