question

tele15 avatar image
tele15 asked Philip.Joung commented

Command prompt not mapping properly

Hi,

I have a problem mapping this response in XML since the line is too long.

I can't even increase the size of the command prompt session -which we use to get the xml response.

response-long-line.txt

Can you please suggest a response map that will help to map this response?

Thanks.

iTest Enterprise
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

AmeyaB avatar image
AmeyaB answered Philip.Joung commented

Have you tried writing the output to a file (e.g. c:\> mycomand.exe > response.txt) and then doing a readFile to dump the contents of the file to the response view?

1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tele15 avatar image tele15 commented ·

Thanks AmeyaB for your suggestion. I think it's an overkill to have all responses to write to a file as we dont know in advance which response will generate a long line.

0 Likes 0 ·
drakesh avatar image
drakesh answered Philip.Joung commented

I dont think so we have an option to increase the iTest command prompt width size in iTest like telnet session.

If you want to map only long line where it is spliting into multiple lines in xml response go for regular expression instead response maps.

lets say your long line as follows where it is splitting into three lines:

<ns:epsDynamicPdnInformation>ppl9.abc.internet$topon.s5- abc.ppl9.modnsw.node.epc.mnc000.mcc111.3gppnetwork. org$epc.mnc000.mcc111.3gppnetwork.org${replace2}lt;/ns:epsDynamicPdnInformation>

Use the below regular expression in analysisrule :

<ns:epsDynamicPdnInformation>ppl9.abc.internet\$topon.s5-\s+abc.ppl9.modnsw.node.epc.mnc000.mcc111.3gppnetwork.\s+org\$epc.mnc000.mcc111.3gppnetwork.org\$\$\$\<\/ns:epsDynamicPdnInformation>

Attached is the sample testcase for your reference.new-testcase.zip


new-testcase.zip (1.0 KiB)
2 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tele15 avatar image tele15 commented ·

Thanks drakesh for your suggestion. I've decided to open a telnet session to cater for long lines.

Do you think we can put in a request to Spirent to support terminal size for Command Prompt?

0 Likes 0 ·
drakesh avatar image drakesh commented ·

Yes we can raise a request with support team (support@spirent.com) to implement this option for command prompt session too. Please send an email to mentioned email.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.