Forum Discussion

alibaba82's avatar
alibaba82
Super Contributor
15 years ago

soapui 3.6 beta 2 stripping out line breaks for assertions

Hello,
I have a REST call which returns reviews

(copied from outline view. notice that line breaks are now not preserved)
Glazunov was reaching the height of his creativity, nearing the age of thirty, when he wrote this pseudo-ballet music. Pseudo because it was conceived as a purely orchestral piece from the beginning, the subject matter of the music, rather than its original function, is the ballet. The musical apprenticeship of conductor Neeme Järvi was spent in Leningrad, the once and later St. Petersburg, one of the ballet capitols of the world and Glazunov's home. His performance of these eight movements that all are in the form of typical ballet suite sections is wholly convincing and idiomatic. One can almost see the massed corps de ballet in the opening and closing movements, the women in long ballet skirts in the opening Preamble, the couples in ball gowns and Nineteenth Century military uniforms in the closing Polonaise; the diaphanous costumes of the Dance Orientale, the rouge spots on the dolls' cheeks in the Marionettes movement. There is no story; one imagines the stories of the ballets that the individual dances might have come from. By the time Järvi recorded Glazunov's Scènes de ballet in August 1989 he had already made many dozens of records of under-represented orchestral music, and was well established as conductor of the Scottish National Orchestra (later the Royal Scottish Orchestra). Their partnership resulted in an exceptional recording of this suite, captured in clear and very "present" -- though quite reverberant -- sound in Caird Hall, Dundee by Brian and Ralph Couzens. This is a recording worthy of a strong recommendation.

(copied from xml view.)
Glazunov was reaching the height of his creativity, nearing the age of thirty, when he wrote this pseudo-ballet music. Pseudo because it was conceived as a purely orchestral piece from the beginning, the subject matter of the music, rather than its original function, is the ballet.
The musical apprenticeship of conductor Neeme Järvi was spent in Leningrad, the once and later St. Petersburg, one of the ballet capitols of the world and Glazunov's home. His performance of these eight movements that all are in the form of typical ballet suite sections is wholly convincing and idiomatic. One can almost see the massed corps de ballet in the opening and closing movements, the women in long ballet skirts in the opening Preamble, the couples in ball gowns and Nineteenth Century military uniforms in the closing Polonaise; the diaphanous costumes of the Dance Orientale, the rouge spots on the dolls' cheeks in the Marionettes movement.
There is no story; one imagines the stories of the ballets that the individual dances might have come from.
By the time Järvi recorded Glazunov's Scènes de ballet in August 1989 he had already made many dozens of records of under-represented orchestral music, and was well established as conductor of the Scottish National Orchestra (later the Royal Scottish Orchestra). Their partnership resulted in an exceptional recording of this suite, captured in clear and very "present" -- though quite reverberant -- sound in Caird Hall, Dundee by Brian and Ralph Couzens. This is a recording worthy of a strong recommendation.

(JDBD query for review)
Glazunov was reaching the height of his creativity, nearing the age of thirty, when he wrote this pseudo-ballet music. Pseudo because it was conceived as a purely orchestral piece from the beginning, the subject matter of the music, rather than its original function, is the ballet.
The musical apprenticeship of conductor Neeme Järvi was spent in Leningrad, the once and later St. Petersburg, one of the ballet capitols of the world and Glazunov's home. His performance of these eight movements that all are in the form of typical ballet suite sections is wholly convincing and idiomatic. One can almost see the massed corps de ballet in the opening and closing movements, the women in long ballet skirts in the opening Preamble, the couples in ball gowns and Nineteenth Century military uniforms in the closing Polonaise; the diaphanous costumes of the Dance Orientale, the rouge spots on the dolls' cheeks in the Marionettes movement.
There is no story; one imagines the stories of the ballets that the individual dances might have come from.
By the time Järvi recorded Glazunov's Scènes de ballet in August 1989 he had already made many dozens of records of under-represented orchestral music, and was well established as conductor of the Scottish National Orchestra (later the Royal Scottish Orchestra). Their partnership resulted in an exceptional recording of this suite, captured in clear and very "present" -- though quite reverberant -- sound in Caird Hall, Dundee by Brian and Ralph Couzens. This is a recording worthy of a strong recommendation.

When trying to assert that JDBC queried review is the same as REST queried review, the assertion fails. This looks like a soapUI bug since the contents are actually the same.

Thanks

Ali
  • Hi Ali,

    can you show a screenshot of the actual comparison failure? The JDBC result seems to contain a strange character before the linebreaks in the text? Could this happen when the data is inserted into the database? Or is it happening when soapUI is reading it?

    regards!

    /Ole
    eviware.com
  • alibaba82's avatar
    alibaba82
    Super Contributor
    soapUI JDBC xml View
    Glazunov was reaching the height of his creativity, nearing the age of thirty, when he wrote this pseudo-ballet music. Pseudo because it was conceived as a purely orchestral piece from the beginning, the subject matter of the music, rather than its original function, is the ballet.
    The musical apprenticeship of conductor Neeme Järvi was spent in Leningrad, the once and later St. Petersburg, one of the ballet capitols of the world and Glazunov's home. His performance of these eight movements that all are in the form of typical ballet suite sections is wholly convincing and idiomatic. One can almost see the massed corps de ballet in the opening and closing movements, the women in long ballet skirts in the opening Preamble, the couples in ball gowns and Nineteenth Century military uniforms in the closing Polonaise; the diaphanous costumes of the Dance Orientale, the rouge spots on the dolls' cheeks in the Marionettes movement.
    There is no story; one imagines the stories of the ballets that the individual dances might have come from.
    By the time Järvi recorded Glazunov's Scènes de ballet in August 1989 he had already made many dozens of records of under-represented orchestral music, and was well established as conductor of the Scottish National Orchestra (later the Royal Scottish Orchestra). Their partnership resulted in an exceptional recording of this suite, captured in clear and very "present" -- though quite reverberant -- sound in Caird Hall, Dundee by Brian and Ralph Couzens. This is a recording worthy of a strong recommendation.

    soapUI JDBC outline View
    Glazunov was reaching the height of his creativity, nearing the age of thirty, when he wrote this pseudo-ballet music. Pseudo because it was conceived as a purely orchestral piece from the beginning, the subject matter of the music, rather than its original function, is the ballet.
    The musical apprenticeship of conductor Neeme Järvi was spent in Leningrad, the once and later St. Petersburg, one of the ballet capitols of the world and Glazunov's home. His performance of these eight movements that all are in the form of typical ballet suite sections is wholly convincing and idiomatic. One can almost see the massed corps de ballet in the opening and closing movements, the women in long ballet skirts in the opening Preamble, the couples in ball gowns and Nineteenth Century military uniforms in the closing Polonaise; the diaphanous costumes of the Dance Orientale, the rouge spots on the dolls' cheeks in the Marionettes movement.
    There is no story; one imagines the stories of the ballets that the individual dances might have come from.
    By the time Järvi recorded Glazunov's Scènes de ballet in August 1989 he had already made many dozens of records of under-represented orchestral music, and was well established as conductor of the Scottish National Orchestra (later the Royal Scottish Orchestra). Their partnership resulted in an exceptional recording of this suite, captured in clear and very "present" -- though quite reverberant -- sound in Caird Hall, Dundee by Brian and Ralph Couzens. This is a recording worthy of a strong recommendation.

    SQL Server content
    Glazunov was reaching the height of his creativity, nearing the age of thirty, when he wrote this pseudo-ballet music. Pseudo because it was conceived as a purely orchestral piece from the beginning, the subject matter of the music, rather than its original function, is the ballet. The musical apprenticeship of conductor Neeme Järvi was spent in Leningrad, the once and later St. Petersburg, one of the ballet capitols of the world and Glazunov's home. His performance of these eight movements that all are in the form of typical ballet suite sections is wholly convincing and idiomatic. One can almost see the massed corps de ballet in the opening and closing movements, the women in long ballet skirts in the opening Preamble, the couples in ball gowns and Nineteenth Century military uniforms in the closing Polonaise; the diaphanous costumes of the Dance Orientale, the rouge spots on the dolls' cheeks in the Marionettes movement. There is no story; one imagines the stories of the ballets that the individual dances might have come from. By the time Järvi recorded Glazunov's Scènes de ballet in August 1989 he had already made many dozens of records of under-represented orchestral music, and was well established as conductor of the Scottish National Orchestra (later the Royal Scottish Orchestra). Their partnership resulted in an exceptional recording of this suite, captured in clear and very "present" -- though quite reverberant -- sound in Caird Hall, Dundee by Brian and Ralph Couzens. This is a recording worthy of a strong recommendation.
  • alibaba82's avatar
    alibaba82
    Super Contributor
    I am using a 'match content of' assertion

    xpath Expression (output of jdbc response)
    //Results[1]/ResultSet[1]/Row[1]/PERFORMANCEREVIEW[1]/text()

    expected result (output of rest response)
    ${Review#ResponseAsXml#declare namespace ns1='com.rovicorp.metadataservice'; //ns1:PerformanceReview[1]/ns1:Data[1]/ns1:text[1]}
  • Hi,

    try using the "normalize-space" function in your xpath-expressions to get the same whitespaces in both texts;

    xpath Expression (output of jdbc response)
    normalize-space(//Results[1]/ResultSet[1]/Row[1]/PERFORMANCEREVIEW[1]/text())

    expected result (output of rest response)
    ${Review#ResponseAsXml#declare namespace ns1='com.rovicorp.metadataservice'; normalize-space(//ns1:PerformanceReview[1]/ns1:Data[1]/ns1:text[1])}

    Does that help?

    regards!

    /Ole
    eviware.com
  • alibaba82's avatar
    alibaba82
    Super Contributor
    this did the trick. thanks.
    So what is the reason behind using normalize-space and when should it be used ?

    thanks

    Ali
  • Hi Ali,

    well, it normalizes line-breaks, tabs, etc in the specified text.. it seems to me that there is some related conversion going on in your case, but I don't know if it is when writing to the database, reading from it, etc.. more investigation needed..

    regards!

    /Ole
    eviware.com