【问题标题】:MUnit with SFTP component带有 SFTP 组件的 MUnit
【发布时间】:2017-09-26 10:23:57
【问题描述】:

有没有人使用 MUnit 和 SFTP 组件,你能提供任何有用的信息/示例来启动吗? 我浏览了 MUnit 文档,但在 Munit 的 SFTP 组件上没有得到太多帮助。

【问题讨论】:

    标签: mule munit


    【解决方案1】:

    使用 Munit FTP 服务器。启用安全属性 true 以使用 SFTP 。请参考本页https://docs.mulesoft.com/munit/v/1.2.0/munit-ftp-server

    在套件运行之前启动服务器,之后停止服务器。示例如下。

         <ftpserver:config name="FTP_Server" secure="true" doc:name="FTP Server"/>
    
    <munit:before-suite name="suiteBefore" description="MUnit Test">
        <ftpserver:start-server config-ref="FTP_Server" doc:name="FTP Server"/>
    </munit:before-suite>
    
    <munit:test name="FlowTest" description="Test">
        --flow test goes here----
        <flow-ref name="test5Flow" doc:name="Flow-ref to test5Flow"/>
        <ftpserver:contains-files config-ref="FTP_Server" file="testFile.xml" path="/tmp" doc:name="FTP Server"/>
    </munit:test>
    
    <munit:after-suite name="After_Suite" description="After suite actions">
        <ftpserver:stop-server config-ref="FTP_Server" doc:name="FTP Server"/>
    </munit:after-suite>
    

    【讨论】:

      【解决方案2】:

      在 Anypoint Studio 中,转到帮助并安装新软件...​。 在 Work with: 面板中查找 MUnit Update Site,然后从 MUnit Tools for Mule 部分中,选择 FTP server Module (Mule 3.4.0+) 然后您将获取 ftp server 的 munit 组件。您可以在before/after 套件来处理数据转换以测试应用程序,您可以将其用作应用程序单元流的出站。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2014-08-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-04-13
        相关资源
        最近更新 更多