\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Jacek Gebal (jgebal)} \pdfinfo{ /Title (utplsql-v3.pdf) /Creator (Cheatography) /Author (Jacek Gebal (jgebal)) /Subject (utPLSQL v3 Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{81007F} \definecolor{LightBackground}{HTML}{F7EFF7} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{utPLSQL v3 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Jacek Gebal (jgebal)} via \textcolor{DarkBackground}{\uline{cheatography.com/22528/cs/11565/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Jacek Gebal (jgebal) \\ \uline{cheatography.com/jgebal} \\ \uline{\seqsplit{www}.oraclethoughts.com} \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 24th April, 2017.\\ Updated 19th July, 2018.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{x{3.76 cm} x{4.24 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Package annotations}} \tn % Row 0 \SetRowColor{LightBackground} -{}-\%suite & Package is a test suite \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} -{}-\%suite(description) & A suite with description \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} -{}-\%suitepath(org.my\_org.my\_project) & Similar to Java package.\{\{nl\}\}Groups suites in namespaces \tn % Row Count 7 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Annotations are sinlgle-line comments starting with a \% sign. \newline Needed in package specification only \{\{link="https://github.com/utPLSQL/utPLSQL/blob/develop/docs/userguide/annotations.md"\}\}(documentation)\{\{/link\}\}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.36 cm} x{4.64 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Procedure annotations}} \tn % Row 0 \SetRowColor{LightBackground} -{}-\%test & The procedure is a test \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} -{}-\%test(description) & A test with description \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} -{}-\%beforetest(procedure\_name) & Runs the procedure before annotated test \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} -{}-\%aftertest(procedure\_name) & Runs the procedure after annotated test \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} -{}-\%beforeall & The procedure to run before first test in suite \tn % Row Count 10 (+ 3) % Row 5 \SetRowColor{white} -{}-\%afterall & The procedure to run after last test in suite \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} -{}-\%beforeeach & The procedure to run before each test \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} -{}-\%aftereach & The procedure to after each test \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Unary matchers}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{be\_empty}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`open l\_cursor for select * from dual where 1 = 0;`\{\{nl\}\}`ut.expect( l\_cursor ).to\_( be\_empty() );`} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{be\_false}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}` ut.expect( ( 1 = 0 ) ).to\_( be\_false() );`} \tn % Row Count 6 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{be\_not\_null}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}` ut.expect( to\_clob('ABC') ).to\_( be\_not\_null() );`} \tn % Row Count 9 (+ 3) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{be\_null}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}` ut.expect( 1 ).to\_( be\_null() );`} \tn % Row Count 11 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{be\_true}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}` ut.expect( ( 1 = 1 ) ).to\_( be\_true() );`} \tn % Row Count 13 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.56 cm} x{5.44 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Common annotations}} \tn % Row 0 \SetRowColor{LightBackground} -{}-\%disabled & Suite / test will not execute \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} -{}-\%rollback(auto) & \{\{link="https://github.com/utPLSQL/utPLSQL/blob/develop/docs/userguide/annotations.md\#using-automatic-rollbacks-in-tests"\}\}Automatic savepoints/rollbacks - {\bf{default}}\{\{/link\}\} \tn % Row Count 9 (+ 7) % Row 2 \SetRowColor{LightBackground} -{}-\%rollback(manual) & No savepoint/rollback \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Expectation structure}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Base expectation block} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`ut.expect( {\emph{actual\_value}} ).to\_( {\emph{matcher}} );`} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Negated expectation block} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`ut.expect( {\emph{actual\_value}} ).not\_to( {\emph{matcher}} );`} \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Shortcuts to matchers} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`ut.expect( {\emph{actual\_value}} ).{[}not\_{]}to\_{\emph{matcher}};`} \tn % Row Count 8 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Equality matcher}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{equal}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`ut.expect( 'a dog' ).to\_(\{\{nl\}\}~~equal( 'a dog' , a\_nulls\_are\_equal =\textgreater{} false ) );`\{\{nl\}\}a\_nulls\_are\_equal is {\bf{true}} by default} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{equal with cursors}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`open l\_expected for select * from dual;`\{\{nl\}\}`open l\_actual for select * from dual where 1 = 0;`\{\{nl\}\}`ut.expect( l\_expected ).to\_(\{\{nl\}\}~~equal(l\_actual, a\_exclude=\textgreater{}'column\_a,column\_b') );`} \tn % Row Count 10 (+ 6) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{equal on objects}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`ut.expect( \seqsplit{anydata.convertObject(l\_expected)} ).to\_(\{\{nl\}\}~~equal( \seqsplit{anydata.convertObject(l\_actual)} ) );`} \tn % Row Count 14 (+ 4) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{equal on collections}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`ut.expect( \seqsplit{anydata.convertCollection(l\_expected)} ).to\_(\{\{nl\}\}~~equal( \seqsplit{anydata.convertCollection(l\_actual)} ) );`} \tn % Row Count 18 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Non-equality matchers}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{be\_like}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`ut.expect( 'Lorem\_impsum' ).to\_(\{\{nl\}\}~~be\_like( a\_mask =\textgreater{} '\%rem\textbackslash{}\_\%', a\_escape\_char =\textgreater{} '\textbackslash{}' ) );`\{\{nl\}\}` ut.expect( 'Lorem\_impsum' ).to\_( be\_like( '\%rem\%sum' ) );`\{\{nl\}\}a\_mask, a\_escape\_char -\textgreater{} see \{\{link="https://docs.oracle.com/database/121/SQLRF/conditions007.htm\#SQLRF52142"\}\}Oracle like operator\{\{/link\}\}} \tn % Row Count 8 (+ 8) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{match}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`ut.expect( a\_actual =\textgreater{} '123-456-ABcd' ).to\_(\{\{nl\}\}~~match( a\_pattern =\textgreater{} '\textbackslash{}d\{3\}-\textbackslash{}d\{3\}-{[}a-z{]}', a\_modifiers =\textgreater{} 'i' ) );`\{\{nl\}\}` ut.expect( 'some value' ).to\_( match( '\textasciicircum{}some.*' ) );`\{\{nl\}\}a\_pattern, a\_modifiers -\textgreater{} see \{\{link="https://docs.oracle.com/database/121/SQLRF/conditions007.htm\#SQLRF00501"\}\}regexp\_like function\{\{/link\}\}} \tn % Row Count 17 (+ 9) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{be\_between}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`ut.expect( 3 ).to\_( be\_between( 1, 3 ) );`} \tn % Row Count 19 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{be\_greater\_or\_equal}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`ut.expect( sysdate ).to\_( be\_greater\_or\_equal( sysdate - 1 ) );`} \tn % Row Count 22 (+ 3) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{be\_greater\_than}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`ut.expect( 2 ).to\_( be\_greater\_than( 1 ) );`} \tn % Row Count 24 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{be\_less\_or\_equal}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`ut.expect( 3 ).to\_( be\_less\_or\_equal( 3 ) );`} \tn % Row Count 26 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{be\_less\_than}}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`exec ut.expect( 3 ).to\_( be\_less\_than( 2 ) );`} \tn % Row Count 28 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Reporting}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Color output} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`exec ut.run(a\_color\_console=\textgreater{}true);`\{\{nl\}\}With \{\{link="http://www.oracle.com/technetwork/developer-tools/sqlcl/downloads/index.html"\}\}sqlcl\{\{/link\}\}\{\{nl\}\}or sqlPlus (Mac, Unix, Windows \{\{link="https://github.com/adoxa/ansicon/releases"\}\}ANSICON\{\{/link\}\})\{\{nl\}\}} \tn % Row Count 7 (+ 7) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{XUnit reporter} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`exec ut.run(ut\_xunit\_reporter());`\{\{nl\}\}\{\{link="https://stackoverflow.com/questions/4922867/junit-xml-format-specification-that-hudson-supports"\}\}JUnit-compatible XML report\{\{/link\}\} for CI servers} \tn % Row Count 13 (+ 6) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{TeamCity reporter} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`exec ut.run(ut\_teamcity\_reporter());`\{\{nl\}\}\{\{link="https://www.jetbrains.com/teamcity/"\}\}TeamCity\{\{/link\}\}-specific report} \tn % Row Count 17 (+ 4) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Sonar Test reporter} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`exec ut.run(ut\_sonar\_test\_reporter());`\{\{nl\}\}\{\{link="https://about.sonarqube.com/"\}\}Sonar\{\{/link\}\}-specific XML tests report} \tn % Row Count 21 (+ 4) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Coverage html reporter} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}` exec ut.run(ut\_coverage\_html\_reporter());`\{\{nl\}\}Produces HTML coverage report} \tn % Row Count 24 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Documentation for \{\{link="https://github.com/utPLSQL/utPLSQL/blob/develop/docs/userguide/coverage.md"\}\}coverage\{\{/link\}\} and \{\{link="https://github.com/utPLSQL/utPLSQL/blob/develop/docs/userguide/reporters.md"\}\}reporters\{\{/link\}\}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Executing tests}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Run all unit tests in my current schema} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`exec ut.run();`} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Run all unit tests in current schema after it was changed to HR} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`alter session set current\_schema='HR';`\{\{nl\}\}`exec ut.run();`} \tn % Row Count 6 (+ 4) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Run all unit tests in specific schema} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`exec ut.run('HR');`} \tn % Row Count 8 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Run all unit tests in specific package of current schema} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`exec \seqsplit{ut.run('test\_betwnstr');`}} \tn % Row Count 11 (+ 3) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Run all unit tests in specific schema.package} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`exec \seqsplit{ut.run('hr.test\_betwnstr');`}} \tn % Row Count 13 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Run one specific test only} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`exec \seqsplit{ut.run('hr.test\_betwnstr.big\_end\_position');`}} \tn % Row Count 16 (+ 3) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Run several items} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`exec ut.run(ut\_varchar2\_list(\{\{nl\}\}~~~~'hr.test\_award\_bonus',\{\{nl\}\}~~~~'hr.test\_betwnstr.big\_end\_position'));`} \tn % Row Count 21 (+ 5) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Run test using \{\{link="https://github.com/utPLSQL/utPLSQL/blob/develop/docs/userguide/annotations.md\#suitepath-concept"\}\}suitepath\{\{/link\}\}} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}` exec \seqsplit{ut.run(':com.my\_org.my\_project');`}} \tn % Row Count 25 (+ 4) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Run the tests as a select statement} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`select * from table(ut.run());`} \tn % Row Count 27 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Catching exceptions}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{procedure \seqsplit{my\_code\_raises\_zero\_divisor} is \newline l\_my\_number number; \newline begin \newline l\_my\_number := 1/0; {\emph{-{}-should raise}} \newline ut.fail('Expected exception but nothing was raised'); \newline exception \newline when others then \newline ut.expect( sqlcode ).to\_equal( -1476 ); \newline end;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}