wearefrank / ladybug

Enable users of your application to debug and test it
Apache License 2.0
14 stars 8 forks source link

Blackbox view does not work in general #282

Open mhdirkse opened 4 months ago

mhdirkse commented 4 months ago

I executed the following configuration:

<Configuration xsi:noNamespaceSchemaLocation="../FrankConfig.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Adapter name="IngestDocument">
        <Receiver>
            <JavaListener name="IngestDocument"/>
        </Receiver>
        <Receiver>
            <ApiListener uriPattern="ingestDocument" method="POST"/>
        </Receiver>
        <Pipeline>
            <Exits>
                <Exit name="success" state="SUCCESS"/>
                <Exit name="badRequest" state="SUCCESS"/>
                <Exit name="serverError" state="ERROR"/>
            </Exits>
            <PutInSessionPipe name="saveBase">
                <!-- Store the input message -->
                <Param name="basename"/>
                <Forward name="success" path="readXmlFile"/>
            </PutInSessionPipe>
            <LocalFileSystemPipe name="readXmlFile" action="read">
                <Param name="filename" pattern="{basename}.xml"/>
                <Forward name="success" path="checkXml"/>
                <Forward name="exception" path="answerBadRequest"/>
            </LocalFileSystemPipe>
            <XmlValidatorPipe name="checkXml" schema="xmlInput.xsd" root="document" storeResultInSessionKey="xmlData">
                <Forward name="success" path="readTxtFile"/>
                <Forward name="failure" path="answerBadRequest"/>
                <Forward name="exception" path="answerBadRequest"/>
            </XmlValidatorPipe>
            <LocalFileSystemPipe name="readTxtFile" action="read">
                <Param name="filename" pattern="{basename}.txt"/>
                <Forward name="success" path="encodeBody"/>
                <Forward name="exception" path="answerBadRequest"/>
            </LocalFileSystemPipe>
            <Base64Pipe name="encodeBody" storeResultInSessionKey="body">
                <Forward name="success" path="composeMundoMessage"/>
                <Forward name="exception" path="answerBadRequest"/>
            </Base64Pipe>
            <XsltPipe name="composeMundoMessage" styleSheetName="conclusion2mundo.xslt" xsltVersion="2" getInputFromSessionKey="xmlData">
                <Param name="body" sessionKey="body"/>
                <Forward name="success" path="sendToMundo"/>
                <Forward name="exception" path="answerBadRequest"/>
            </XsltPipe>
            <SenderPipe name="sendToMundo">
                <HttpSender name="sendToMundo" methodType="POST" url="${mundoUrl}"/>
                <Forward name="success" path="success"/>
                <Forward name="exception" path="serverError"/>
            </SenderPipe>
            <FixedResultPipe name="answerBadRequest" returnString="bad request">
                <Forward name="success" path="badRequest"/>
            </FixedResultPipe>
        </Pipeline>
    </Adapter>
</Configuration>

I selected the black box view in the Angular Ladybug GUI and then opened the report in the debug tree. It looks as shown.

image

Expected result is that I would only see:

mhdirkse commented 4 months ago

I will soon document this test in project https://github.com/wearefrank/ladybug .

mhdirkse commented 4 months ago

Question: do we want to see all the session keys in the black box view? The session keys right inside the Pipeline node. I would think they should be in.

mhdirkse commented 4 months ago

In the legacy ladybug GUI, it looks like this:

image

Here the session keys right inside the Pipeline node are NOT shown.

MatthijsSmets commented 2 months ago

This is a backend issue moving it to the backend repo.