Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
Column
width25px

 

Column
width700px
Panel
bgColor#E0E6F8
titleColor#0B0B61
titleBGColor#CED8F6
titleExample of expected-log-expression attribute

assert-log(

log-name-pattern: '^s_m_SESSION\\.log$',

expected-log-expression: 'sq_rdcf_fact_load_temp: rmflt.1.0',

failure-id: 'TEMP: sq_rdcf_fact_load_temp version number not found'

);

Column

 

In the above example, assertion-mode is not specified.  The assertion-mode value will be "contains," the default.

Go to top

expected-log-file:

Name of log assertion data file - for testing multiple rows of text

Anchor
expected-log-file
expected-log-file

  • Use the expected-log-file attribute along with a text file that contains the expected log text, when you need to assert against multiple lines of text.
  • The file containing assertion data should be located in a folder called "log," a sibling of your test class.
  • The file name should have the extension ".expr"
  • The lines of text contained in the .expr file do not represent every byte of the log file.  They represent an excerpt.
  • Provide the name of that file in your etlunit test file structure, minus the ".expr" file name extension.

expected-log-file attribute example

...