Blog Lead Image - Network Pen Writing https://www.avioconsulting.com/taxonomy/term/358 en 6 Tips to Make the Most of SOAPUI — Part 2 https://www.avioconsulting.com/blog/6-tips-make-most-soapui-part-2 <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/6-tips-make-most-soapui-part-2" hreflang="en">6 Tips to Make the Most of SOAPUI — Part 2</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p>If you’ve used SOAPUI for any length of time, you’ve probably concluded it’s a really useful tool!  Automated API testing has been figurative manna from the heavens for the testing crowd at AVIO Consulting.  So, since everyone loves a good list, here are 3 more tips to make your experience in SOAPUI an even more productive one.</p> <p>The first 3 tips (part 1) centered on navigation, ease of use, and best practices (link below). The last 3 (part 2) will be based on lessons learned.</p> <p>Ready?  Here we go!</p> <p>4. Disable/enable for on-the-go Customization<br /> 5. Flexible Outcomes for the Win<br /> 6. Crash and … Wait, Don’t Crash</p> <h3><br /><strong>4. Disable/enable for on-the-go Customization</strong></h3> <p>As a part of our normal testing strategy, we write an end-to-end test of the BPM process for a given functional area.  However, it’s not uncommon for a bug to occur at the UI level some “distance” into the BPM process.  As a tester, this presents a conundrum with two likely possible ways forward:</p> <p>1. Create a new test to test a specific bug.<br /> 2. Manually test the BPM process in the UI to reach the reported issue.</p> <p>Neither of these options is always an efficient use of time.  So, why not get a little creative with a third option?</p> <p><img alt="Disabling test steps" data-entity-type="file" data-entity-uuid="472019bd-8333-4581-af85-db5b6347dbb2" src="/sites/default/files/inline-images/2.png" /><br /> If you’ve found yourself in the same situation, consider saving a little time by doing the following.</p> <p>1. Identify where the reported issue lies in the BPM process.<br /> 2. Find the closest human task to the reported issue (if applicable).<br /> 3. <strong>Disable</strong> all test steps in a given test case <strong>after</strong> the reported issue is alleged to occur in the UI.<br /> 4. Log in to the UI to test the issue.</p> <p>This scenario is rather common for us.  If your functional tests look like the portion of the test case shown above, this strategy will save a lot of manual testing.   </p> <h3><strong>5. Flexible Architecture for the Win</strong></h3> <p>As functional tests grow in complexity, maintenance becomes increasingly time-consuming.  So as to maximize productivity, consider a functional test architecture that allows human task outcomes, task activities, and even BPM roles to be changed/updated at will in SOAPUI.  </p> <p>It may take more time up front, but coding on the presupposition of change affords easier test compliance and re-usability down the road.  </p> <p>Here’s what I mean.</p> <p><img alt="Screenshot of SOAPUI" data-entity-type="file" data-entity-uuid="914d94f5-c57e-4ea9-887e-66017398c835" src="/sites/default/files/inline-images/Redo.png" /></p> <p>In the example above, the &lt;activityKey&gt; (top), &lt;participant&gt; (middle), and &lt;outcome&gt; are each interchangeable with other pre-defined values in our system.  </p> <p>Prior to the implementation seen above, these activities, roles, and outcomes were sourced from an audit export file and hardcoded.  What a drag!  Now, test case maintenance goes far more quickly than it used to.  </p> <h3><strong>6. Crash and … Wait, Don’t Crash</strong></h3> <p>Perhaps you’ve been unlucky enough to have SOAPUI crash while testing — I certainly have.  As our test cases grow longer, SOAPUI shows a little more of its “character.”  To avoid unwanted application crashes due to memory constraints, try the following.</p> <p><img alt="Test cases to modify" data-entity-type="file" data-entity-uuid="7da85998-2432-45f1-954d-baf8ea807325" src="/sites/default/files/inline-images/download.png" /></p> <p>1. Identify problematic test cases to modify.<br /> 2. Double-click each problematic test case and open the settings menu (gear icon).<br /> 3. Check the “Discards successful TestStep results to preserve memory” box.<br /> 4. You’re done!</p> <p>There may be more sophisticated ways to preserve system memory and/or stabilize SOAPUI while running lengthy functional tests.  However, this has worked well for us.  We think it’ll help you out, too.  </p> <p>As always, we want to hear from you, our readers.  Which of the tips above helped the most or the least?  Are you already using these in your daily testing practice?  How can the above be improved for greater productivity and usefulness?</p> <p>Be sure to check out our other blogs and check back often for more content!</p> <h3><strong>Other [Somewhat] Helpful Blogs:</strong></h3> <ul><li><a href="http://www.avioconsulting.com/blog/6-tips-make-most-soapui-part-1">6 Tips to Make the Most of SOAPUI — Part 1</a></li> <li><a href="http://www.avioconsulting.com/blog/optimizing-user-stories-efficiency">Optimizing User Stories for Efficiency</a></li> <li><a href="http://www.avioconsulting.com/blog/always-strive-better">Always Strive for Better</a></li> <li><a href="http://www.avioconsulting.com/blog/scrum-crumbs-three-things-i-think-i-learned">Scrum Crumbs: Three Things I Think I Learned</a></li> </ul></div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=694&amp;2=comment_node_blog&amp;3=comment_node_blog" token="lFddCABZa3joTL_YD01KOJphx6QFONYRMc-58oQ-hYc"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/other" hreflang="en">Other</a></div> </div> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Wed, 22 Nov 2017 21:47:31 +0000 Mark Hearon 694 at https://www.avioconsulting.com Good SOA Pipeline Plumbing https://www.avioconsulting.com/blog/good-soa-pipeline-plumbing <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/good-soa-pipeline-plumbing" hreflang="en">Good SOA Pipeline Plumbing</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><h1>Starting Up</h1> <p>The arrival of the <a href="https://jenkins.io/doc/book/pipeline/">Jenkins Pipeline</a> feature coincided with the the addition of Maven in the Oracle Fusion Middleware 12c release.  Jenkins pipelines now easily leverage Maven phases and goals for Fusion Middleware application deployments, including SOA/BPM composite applications and Service Bus projects.  This is the first in a series of blogs that will present three deployment <em>workflows</em> (pipelines)<em> </em>implemented in Jenkins for Oracle SOA projects.  The workflows will utilize Git source control, Git Flow branching methodology and scripts.  It also assumes the use of a managed Maven repository where application and FMW Maven artifacts are centralized.  Although the blogs primarily address SOA, there will be discussions about Metadata Services (MDS) and Service Bus (OSB) deployments.      </p> <p>Although the approach defined here in Jenkins is leverages open source tools organizations should weigh the approach outlined here to the benefits (e.g. support and upgrades) that a <u>commercial</u> product brings to the table, like <a href="https://myst.rubiconred.com/">MyST from Rubicon Red</a>.  MyST provides both platform provisioning and application release management tools that enable you to move the associated WebLogic artifacts (like data sources, queues, topics) when the application is promoted to higher environments.  Both are versioned nicely in MyST and easily migrated in the MyST release management dashboard.  </p> <p>Jenkins however is the most widely adopted <u>open source</u> build server available, highly scalable, with a very large library of plugins to accomplish virtually any build task.  Jenkins provides a way to automate the tasks associated with building and deploying a application component using the Groovy language that leverages an extensive plugin library exposed through Java, referred to as a "pipeline".   The pipeline provides a graphical view of the deployment, as a series of stages, e.g. "Checkout", "Package", "Deploy", "Test".   Additionally there are manual gateways that can be implemented in a pipeline that only certain groups or users can performed, in the form of role-based assignments.</p> <h1>Why Git and Git Flow?</h1> <p>Although there are many successful FMW implementations using SVN and the Maven Release plugins there seems to be a shift in their use in favor of the Git source code management system and the Git Flow scripts.  The Maven Release plugin is seen by many as needlessly complex and redundant in its builds and source code updates.  (<a href="https://dzone.com/articles/why-i-never-use-maven-release">This blog questions why people are still using the Maven Release plugin</a>.)  Git's more flexible merge capabilities, coupled with a <a href="http://nvie.com/posts/a-successful-git-branching-model/">robust branching methodology in the form of Git Flow</a> are being utilized increasingly adopted today.  SVN proponents would argue that similar workflows can be implemented in SVN but not many (OK, none) are implemented in SVN client tools, as is the case for Git Flow in tools like GitKraken (Axosoft) and SourceTree (Atlassian).   </p> <p>In the interest of fairness to all I'll provide an <a href="http://endoflineblog.com/gitflow-considered-harmful">unfavorable link to the use of Git Flow</a>, so you may judge for yourself.  Be sure to read the comments people posted in blog as the responses turn the arguments around against the use of Git Flow.        </p> <h1>The Pipelines</h1> <p>The three pipelines to be covered in this blog series are referred to as "CI" (<strong>Continuous Integration</strong>), "CR" (<strong>Create Release</strong>) and "DR" (<strong>Deployment Release</strong>) and the details for each follow in the sections below.  They provide a full life cycle for the release of software from development, through test and production environments.  Although, the pipelines focus on SOA composites and MDS projects, the pipelines can be extrapolated to include OSB, JAX-WS, and ADF deployments.  </p> <p>Custom builds for JMS, data sources (using WebLogic WLST plugin for example) are not within the scope of this topic but pipelines should be created to automate these tasks as well.</p> <h2>Continuous Integration (CI) Pipeline</h2> <p>Much is already written about Continuous Integration (see <a href="https://www.martinfowler.com/articles/continuousIntegration.html#IntroducingContinuousIntegration">Martin Fowler topics</a> for good overview).  When the Git project repository "develop" branch is updated on the remote Git repository it triggers a build of the CI pipeline for the project.  The build server CI job is polling source control at a specified interval.  The Developer role on the build server may manually submit or cancel a build.  The goal of the build is to automatically deploy the SOA project to the SOA-DEV environment where automated unit or integration tests can be run.  More times than not SOA tests are integrated, that is, they rely on the SOA deployment and are not run in isolation as a unit test.  Regardless, tests should be written and run in every CI build.  In the event of testing failures the developer (team) should be notified so the errors can review the errors in Jenkins.</p> <h4><img data-image-src="https://www.lucidchart.com/publicSegments/view/6e4eacc4-f41e-4adc-bb4b-17910345a1c2/image.png" src="https://www.lucidchart.com/publicSegments/view/6e4eacc4-f41e-4adc-bb4b-17910345a1c2/image.png" width="930" /></h4> <h2>Create Release (CR) Pipeline</h2> <p>The CR pipeline is principally a Git Flow nuance, to run the "<a href="https://danielkummer.github.io/git-flow-cheatsheet/">git flow release start</a>" script that captures the current "develop" branch to create a "release" branch.  However, after the release is created in the Git repository, there are additional steps that follow to update the Maven artifacts in the newly created release, to remove the "-SNAPSHOT" verbiage.  Once this is done the branch is checked back into the Git project repository.  This facilitates the DR pipleline creation of a common SOA archive (JAR) that is used for both TEST and PROD deployment.    </p> <p><img data-image-src="https://www.lucidchart.com/publicSegments/view/904f6a9d-7583-4510-be87-52b0be856194/image.png" src="https://www.lucidchart.com/publicSegments/view/904f6a9d-7583-4510-be87-52b0be856194/image.png" width="930" /></p> <h2>Deployment Release (DR) Pipeline</h2> <p>Although the pipeline looks quite busy it's chief purpose is to create a deployable SOA archive that will be built once, stored in the Maven artifact repository (Artifactory) and then used for the TEST and PROD deployments when they are approved.</p> <p>The DR pipeline will use the current "release" branch in the Git repository and will prompt the Test Admin when it is ready for deployment to TEST.  There is polling performed on the "release" branch as developers will be committing fixes to the "release" branch so any number of builds may be done before it is deployed to TEST.   Only the Test Admin can approve the deployment to TEST.  The Test Admin may wait unit end-of-day before approving the deployment to TEST.</p> <p>After deployment to TEST then testing proceeds and developers fix defects in the release branch.  When a change is committed by a developer to the "release" branch it will trigger another build.  Once again the Test Admin will be prompted whether the build should be deployed to TEST.  Perhaps this is only done at end of day and there may be any number of release build initiated (but not deployed) until the Test Admin OK's it.  It also provides a Prod Admin with the ability to OK a deployment to production.  The latter is always optional and as a release must be first be "accepted" before the Prod Admin will be notified of the deployment opportunity.</p> <p><img data-image-src="https://www.lucidchart.com/publicSegments/view/9bcb8689-c620-4ce5-bf05-1db027cdd5bb/image.png" src="https://www.lucidchart.com/publicSegments/view/9bcb8689-c620-4ce5-bf05-1db027cdd5bb/image.png" width="930" /></p> <p><img alt="(info)" border="0" data-emoticon-name="information" src="/wiki/s/351867826/6452/455ffca7d1083586bd1a81b372c0aa7f2981e757/_/images/icons/emoticons/information.png" title="(info)" /> In case you were wondering what the "Accept Release" step is, read on in the blog series!</p> <h1>Finishing Up</h1> <p>While Continuous Integration implementation are relatively easy to implement in Jenkins, it is important to ensure automated tests are also incorporated into the feedback look to ensure what is considered "done" from a development perspective will pass muster.  In addition to the <a href="https://en.opitz-consulting.com/portfolio/bpm-soa-integration.html">Opitz</a> Framework for SOA testing, SoapUI (see my other blog topic on this subject) can be leverage easily as well.  </p> </div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=691&amp;2=comment_node_blog&amp;3=comment_node_blog" token="Xh9Hs49LcglhxPzrWsaNx03Ny7laUPHptj5go8Hm6lA"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/soa" hreflang="en">SOA</a></div> </div> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Sat, 18 Nov 2017 22:47:20 +0000 Gregory Hughlett 691 at https://www.avioconsulting.com https://www.avioconsulting.com/blog/good-soa-pipeline-plumbing#comments Overcoming Javascript numeric precision issues https://www.avioconsulting.com/blog/overcoming-javascript-numeric-precision-issues <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/overcoming-javascript-numeric-precision-issues" hreflang="en">Overcoming Javascript numeric precision issues</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p>In Javascript, all numbers are encoded as double precision floating point numbers, following the international IEEE 754 standard. This format stores numbers in 64 bits, where the number, the fraction (AKA mantissa), is stored in bits 0 to 51, the exponent in bits 52 to 62, and the sign in bit 63.</p> <p> </p> <img alt="floating point structure" data-entity-type="file" data-entity-uuid="751d0c27-1550-47e8-b813-4747aa6255ec" src="/sites/default/files/inline-images/2017-11-18%2018_19_11-Clipboard.png" class="align-center" /><p> </p> <p>Floating-point numbers are represented as binary (base 2) fractions. Regrettably, most decimal fractions cannot be represented exactly as binary fractions. The decimal floating-point numbers you enter are only approximated by the binary floating-point numbers actually stored in the machine. That being said, you'll see that floating-point arithmetic is NOT 100% accurate.</p> <pre> <code class="language-javascript">0.2 + 0.1 0.30000000000000004 0.3 - 0.1 0.19999999999999998 1111.11+1111.11+1111.11+1111.11+1111.11 5555.549999999999 </code></pre> <p> </p> <p>Even more, you can lose precision when performing operations, such as addition and subtraction, on decimal numbers with very different absolute value.</p> <pre> <code class="language-javascript">99999999999.0123 + 0.00231432423 99999999999.01462</code></pre> <p> </p> <p>There are more examples. Integer numbers between -(2<sup>53</sup> -1) and 2<sup>53</sup>+1 are accurately represented. Beyond this threshold, not all integer numbers can be represented. You can think that in Javascript, integer numbers are accurate up to 15 digits.</p> <pre> <code class="language-javascript">Math.pow(2, 53) - 1 9,007,199,254,740,991 //Max positive safe integer in Javascript Number(999999999999999); 999999999999999 Number(9999999999999999); 10000000000000000</code></pre> <p>In this post, I’ll present two different strategies to overcome these precision issues: one for decimal numbers and another for integer numbers.</p> <p> </p> <h2>Strategy for decimal numbers</h2> <p>There are two things to tackle here, representation and handling of decimal numbers. <br /> In order to prevent losing precision, decimal values must be serialized as strings and not as JSON numbers. But also, there should be a way to tell if a JSON string value corresponds to a decimal number or is merely a string. One solution could be to create a custom representation for decimal numbers, for instance: </p> <pre> <code class="language-javascript">amount: { _type: "BigDecimal", _value_str: "1234.56"} </code></pre> <p>Having covered representation part, we need an alternative to Javascript numbers. There are several libraries, such as <em>big.js</em>, <em>bignumber.js</em>, <em>decimal.js</em> and <em>bigdecimal.js</em>, to address this issue. All of them provide arbitrary-precision decimal arithmetic (find benchmarks <a href="https://jsperf.com/bignumber-js-vs-big-js-vs-decimal-js/8">here</a>). If you don’t need to perform complex arithmetic operations, such as logarithms, square roots, etc., and mostly, you do additions, subtractions, multiplications, and divisions; then <em>big.js</em> library could be the best choice.</p> <pre> <code class="language-javascript">//Creating a Big object (Throws NaN on an invalid value) var amount1 = new Big(“0.1”); // var amount2 = Big(“0.2”); // 'new' is optional amount1.plus(amount2); // the result is a new Big object with value 0.3 </code></pre> <p>The last piece of the solution would be an HTTP interceptor to convert decimal numbers from their custom JSON representation to <em>big.js </em>(or to the implementation you chose) objects and vice versa.</p> <p> </p> <h2>Strategy for integer numbers</h2> <p>As mentioned before, the safe range for JSON integers is -2<sup>53</sup>  &lt; x  &lt; 2<sup>53</sup>. So, let's analyze what can fit inside that range:</p> <ul><li>2<sup>53</sup> milliseconds has us covered for around ±300,000 years. Do you need to handle dates outside this range? </li> <li>Assuming that you represent DB table ids as integers. Are you going to insert in a table more than 9 quadrillion rows?</li> <li>In addition to DB tables ids, in case you use integers to represent sort orders, quantities, amount of days, etc. Do you need to support integer quantities over 9,007,199,254,740,991?</li> </ul><p>In most scenarios, we could declare that there is no problem. Our code breaks when provided with obscenely large numbers, but we simply do not use numbers that large and we never will.<br /> So, as a solution for integer values, we'll reject values outside of the safe range, even when they fit in a double. For this, you can use custom serializers/deserializers to prevent sending/receiving integer values outside of the safe range.</p> <p> </p> <h2>Summary</h2> <p>It's very important to tackle the Javascript numeric precision issue sooner than later. Ideally, before you start writing the first line of code of your application. Once you realize that this issue affected your application, maybe it's too late and some data has been corrupted.</p> </div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=690&amp;2=comment_node_blog&amp;3=comment_node_blog" token="4yMzRWfE3Ykg_YG7X6GusL20ZCeQaEOqmSiWM00_uik"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/other" hreflang="en">Other</a></div> </div> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Sat, 18 Nov 2017 21:37:58 +0000 Sebastian Marucci 690 at https://www.avioconsulting.com Quick look into Oracle BPM 12c REST APIs https://www.avioconsulting.com/blog/quick-look-oracle-bpm-12c-rest-apis <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/quick-look-oracle-bpm-12c-rest-apis" hreflang="en">Quick look into Oracle BPM 12c REST APIs</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p>Back in mid-2014, Oracle was releasing Oracle BPM 11g Bundle Patch 3 and with it, the first version of its BPM REST APIs. That first cut was a good starting point, but it just offered a limited amount of functionality (find my previous post <a href="http://www.avioconsulting.com/blog/reviewing-oracle-bpms-new-rest-api">here</a>). In this post, we’ll take a look at the BPM REST APIs version 12.2.1.2, released in August 2016, and see how they evolved after 2 years. </p> <p>The list of available services can be obtained by accessing to <a href="http://yourserver:port/bpm/services/rest/application.wadl">http://yourserver:port/bpm/services/rest/application.wadl</a>.</p> <p><img alt="BPM REST APIs WADL" data-entity-type="file" data-entity-uuid="cbe7d1b9-1fd1-4a45-9740-7c63d44091e8" height="679" src="/sites/default/files/inline-images/2017-11-11%2018_11_35-Clipboard.png" width="833" /></p> <p>The picture above shows all the REST services included in this new version; highlighted in yellow are the new services introduced since the first version of the REST APIs. There’s one curious thing, the two processes services (1.0/processes and /processes). Like in the very first version of <em>processes </em>service, if you execute <em>getProcess </em>operation, the response is just “Processes.”. Likewise with <em>runtime </em>service, if you execute <em>getRuntime </em>operation, the response is an empty string.</p> <p>Let’s now focus on one of the most important things we would like to do with these REST APIs: get and update the task payload. This can be achieved using <em>tasks </em>service and we need to know the <em>task number</em> of the task we want to work with. The <em>task number</em> is no other thing than an integer number that identifies the task, but internally the BPM APIs don’t use it, they use the <em>task id</em> instead, which is a string (GUID). So, the first thing the REST operation will do is, to call a service to get the <em>task id</em> for the given <em>task number</em>.</p> <p>The following picture shows the response of <em>getTask </em>operation.</p> <p style="margin:0in 0in 8pt"><img alt="getTask outcome" data-entity-type="file" data-entity-uuid="cfbaa0e2-11bb-4435-a7f4-bb4d827ba2fa" height="811" src="/sites/default/files/inline-images/2017-11-11%2018_12_25-Clipboard.png" width="858" /></p> <p>In this version, the URL of the operation to get the task payload is <em>tasks/:taskNumber/summaryFields</em> but in the very first version, it was <em>tasks/:taskNumber/payload</em>.</p> <p>Below, there is the response of the call to <em>getSummaryFields </em>operation.</p> <p style="margin:0in 0in 8pt"><img alt="getSummaryFields outcome" data-entity-type="file" data-entity-uuid="0a772912-1f2b-47e1-aa28-76d4df5000cb" height="274" src="/sites/default/files/inline-images/2017-11-11%2018_12_47-Clipboard.png" width="862" /></p> <p>I’ve tried several times this operation with different tasks numbers and the response was always the same. In a further analysis I found out that internally, the <em>getSummaryFields </em>REST operation is calling the Human Workflow Web Service operation <em>getSummaryFieldsInfoForTask</em>.</p> <p style="margin:0in 0in 8pt"><img alt="getSummaryFieldsInfoForTask outcome" data-entity-type="file" data-entity-uuid="f98403d4-9d40-4df9-965b-b11f0658c2d2" height="606" src="/sites/default/files/inline-images/2017-11-11%2018_13_06-Clipboard.png" width="864" /></p> <p>It seems this web service is the culprit of the “Task payload not found” message returned by <em>getSummaryFields </em>operation.</p> <p>In brief, no major changes have been done in the BPM REST APIs. There are some new services but is still not possible to get and update the task payload.</p> </div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=689&amp;2=comment_node_blog&amp;3=comment_node_blog" token="Kr2NuHGIvAgyP1dPPsvSQxMT2m5sKm7ifUyjxrSqlhA"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/bpm" hreflang="en">BPM</a></div> </div> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Sat, 11 Nov 2017 21:22:52 +0000 Sebastian Marucci 689 at https://www.avioconsulting.com Running SoapUI Tests in Maven https://www.avioconsulting.com/blog/running-soapui-tests-maven <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/running-soapui-tests-maven" hreflang="en">Running SoapUI Tests in Maven</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><h1>Starting Up</h1> <p>An important benefit of Continuous Integration is the feedback it provides to the development team after the code is checked into "trunk", or in Git when pushed to the development branch.  The use of SoapUI to create web service tests is fairly typical in most organizations and is considered the de facto standard testing tool in SOA.  This blog address the uses of the <a href="https://www.soapui.org/test-automation/maven/maven-2-x.html">SmartBear Maven plugin</a> and best practices around incorporating it into SOA 12c projects.</p> <h1>Plugging the Project POM</h1> <p>In the section below there are two plugins for testing (SoapUI and SureFire) were used by the project POM.  Rather than adding them directly to the project POM create a separate parent POM and inherit it in the project POM.  <a href="http://www.avioconsulting.com/blog/improving-your-soa-12c-maven-build" rel="nofollow">See this blog topic</a> for more details about using parent POMs in SOA projects.  </p> <p>Let's cover the SoapUI plugin first.  There are two items worth mentioning about it:</p> <ul><li>The "<strong>endpoint</strong>" property references the endpoint property defined in the project POM and that will be used for service endpoint of the test in the SoapUI project.</li> <li>The dependency to com.jgoodies is to overcome a missing class in 5.2.1 SoapUI plugin distribution.</li> <li>The execution of the plugin is predicated on the "<strong>integration-test"</strong> phase, as it is an integration test.</li> </ul><pre> <code class="language-xml">... &lt;plugin&gt; &lt;groupId&gt;com.smartbear.soapui&lt;/groupId&gt; &lt;artifactId&gt;soapui-maven-plugin&lt;/artifactId&gt; &lt;version&gt;5.2.1&lt;/version&gt; &lt;configuration&gt; &lt;projectFile&gt;${basedir}/soapui-project/${project.artifactId}-soapui-project-${env}.xml&lt;/projectFile&gt; &lt;testSuite&gt;SoaTestSuite&lt;/testSuite&gt; &lt;printReport&gt;true&lt;/printReport&gt; &lt;outputFolder&gt;${basedir}/soapui-output&lt;/outputFolder&gt; &lt;junitReport&gt;true&lt;/junitReport&gt; &lt;host&gt;${soa.host}:${soa.port}&lt;/host&gt; &lt;username&gt;${weblogic.user}&lt;/username&gt; &lt;password&gt;${weblogic.password}&lt;/password&gt; &lt;endpoint&gt;${endpoint}&lt;/endpoint&gt; &lt;/configuration&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;com.jgoodies&lt;/groupId&gt; &lt;artifactId&gt;forms&lt;/artifactId&gt; &lt;version&gt;1.0.7&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;SoapUI-Test&lt;/id&gt; &lt;phase&gt;integration-test&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;test&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt;</code></pre> <p> </p> <ul></ul><p>How does one get the SoapUI Maven artifacts for the above plugin?  Add the following profiles to the Maven <strong>settings.xml</strong> and be sure to activate them.  Obviously the Smartbear-Profile will pull in the SoapUI plugins.  The Maven-Central-Profile will pull in the SureFire plugin and its dependencies.</p> <pre> <code class="language-xml">... &lt;profile&gt; &lt;id&gt;Smartbear-Profile&lt;/id&gt; &lt;pluginRepositories&gt; &lt;pluginRepository&gt; &lt;id&gt;smartbear-plugin-repository&lt;/id&gt; &lt;url&gt;http://www.soapui.org/repository/maven2/&lt;/url&gt; &lt;/pluginRepository&gt; &lt;/pluginRepositories&gt; &lt;/profile&gt; &lt;profile&gt; &lt;id&gt;Maven-Central-Profile&lt;/id&gt; &lt;pluginRepositories&gt; &lt;pluginRepository&gt; &lt;id&gt;maven-repo-central&lt;/id&gt; &lt;url&gt;http://repo.maven.apache.org/maven2/&lt;/url&gt; &lt;/pluginRepository&gt; &lt;/pluginRepositories&gt; &lt;/profile&gt; &lt;activeProfiles&gt; ... &lt;activeProfile&gt;Maven-Central-Profile&lt;/activeProfile&gt; &lt;activeProfile&gt;Smartbear-Profile&lt;/activeProfile&gt; &lt;/activeProfiles&gt; &lt;/settings&gt;</code></pre> <p>The second testing plugin is the SureFire plugin, to produce HTML report output from the XML created by the SoapUI plugin.  SureFire can then be set to fail if the tests are not entirely or partially (it's configurable) successful.</p> <pre> <code class="language-xml">... &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-surefire-report-plugin&lt;/artifactId&gt; &lt;version&gt;2.20.1&lt;/version&gt; &lt;configuration&gt; &lt;reportsDirectories&gt; &lt;reportsDirectory&gt;${basedir}/soapui-output&lt;/reportsDirectory&gt; &lt;/reportsDirectories&gt; &lt;outputDirectory&gt;${basedir}/soapui-output&lt;/outputDirectory&gt; &lt;outputName&gt;${project.artifactId}-TEST-${env}&lt;/outputName&gt; &lt;showSuccess&gt;true&lt;/showSuccess&gt; &lt;aggregate&gt;true&lt;/aggregate&gt; &lt;linkXRef&gt;false&lt;/linkXRef&gt; &lt;/configuration&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;Surefire-Report&lt;/id&gt; &lt;phase&gt;verify&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;report-only&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt;</code></pre> <ul><li>The SureFire plugin will execute in the "<b>verify</b>" phase so it succeeds the steps that deploy the SOA composite and run the SoapUI tests.  </li> <li>The plugin will parse XML output files produced by the SoapUI plugin, contained in the "<strong>soapui-output</strong>" directory (located in the SOA composite project directory).  </li> <li>The HTML report will be created in the same SoapUI output directory as a file named "...<strong>TEST...html</strong>".  </li> </ul><h1>Running the SoapUI Tests</h1> <p>The SOA Composite project Maven "<strong>verify</strong>" phase is run that deploys the composite (pre-integration-test), runs the SoapUI tests (integration-test) and lastly runs Surefire to produce the HTML output and produce an error if they fail to run successfully.  The "<strong>env</strong>" argument shown below is used by the custom parent POM to retrieve properties for the deployment, that live in a file named "Local-Docker.properties" that is included with the application.</p> <pre> <code>mvn verify -Denv=Local-Docker -Dsoa.oracle.home=...</code></pre> <p>In the Maven output below the test results are summarized via the use of the "printReport" property in the SoapUI plugin.</p> <pre> <code>... SoapUI 5.2.1 Maven2 TestCase Runner 16:52:44,914 INFO [DefaultSoapUICore] Creating new settings at [C:\Users\GREG\soapui-settings.xml] 16:52:45,850 INFO [PluginManager] 0 plugins loaded in 2 ms 16:52:45,851 INFO [DefaultSoapUICore] All plugins loaded 16:52:46,603 INFO [WsdlProject] Loaded project from [file:/D:/GregHughlett/jdeveloper/mywork/SoaScaTestApp/SoaScaTest/soapui-project/simple-test-soapui-project.xml] 16:52:46,610 INFO [SoapUITestCaseRunner] Setting project property [messageToSoa] to [Hello from POM] 16:52:46,611 INFO [SoapUITestCaseRunner] Running SoapUI tests in project [simple-test-soapui-project] 16:52:46,612 INFO [SoapUITestCaseRunner] Running TestCase [SendMessageToSoa] 16:52:46,635 INFO [SoapUITestCaseRunner] Running SoapUI testcase [SendMessageToSoa] 16:52:46,646 INFO [SoapUITestCaseRunner] running step [sendMessage] 16:52:46,835 DEBUG [HttpClientSupport$SoapUIHttpClient] Attempt 1 to execute request 16:52:46,836 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: POST /soa-infra/services/default/SoaScaTest/soascaprocess__ep HTTP/1.1 16:52:46,930 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 200 OK 16:52:46,935 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive indefinitely 16:52:47,042 INFO [SoapUITestCaseRunner] Assertion [SOAP Response] has status VALID 16:52:47,043 INFO [SoapUITestCaseRunner] Assertion [Contains] has status VALID 16:52:47,049 INFO [SoapUITestCaseRunner] Finished running SoapUI testcase [SendMessageToSoa], time taken: 386ms, status: FINISHED ... SoapUI 5.2.1 TestCaseRunner Summary ----------------------------- Time Taken: 27056ms Total TestSuites: 1 Total TestCases: 1 (0 failed) Total TestSteps: 1 Total Request Assertions: 3 Total Failed Assertions: 0 Total Exported Results: 0 ... [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:21 min [INFO] Finished at: 2017-07-03T16:09:09-04:00 [INFO] Final Memory: 29M/323M [INFO] ------------------------------------------------------------------------</code></pre> <h1>Finishing Up</h1> <p>There are a number of best practices to be recommended here, to provide flexible uses of SoaUI projects in local Integrated WebLogic and DEV deployments.</p> <ul><li>Have developers who create the SoapUI projects standardize on their version of SoapUI, to eliminate differences an older or incompatible release may create.  </li> <li> <p>Create a "soapui-project directory" in the JDeveloper workspace directory.  The configuration of the SoapUI plugin can then reference it relative to ${basedir}.</p> </li> <li>If targeting an SSL SOA environment then be sure to add the keystore with the server certificate imported (e.g. DemoTrust.jks) before importing the WSDL URL to create the SoapUI project.  Be sure to also include the keystore in the newly created project.</li> </ul><p><img alt="Add keystore to preferences" data-entity-type="file" data-entity-uuid="687d1503-e2de-4c45-b396-a88c07ac03dd" src="/sites/default/files/inline-images/add-keystore-preferences.png" /></p> <ul><li>There may be occasions when you may want to deploy the project but not run any of the test steps associated with SoapUI or Surefire.  Simply include this property on the Maven command line.</li> </ul><pre> <code> -Dmaven.test.skip=true </code></pre> <p> </p> <p> </p> </div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=688&amp;2=comment_node_blog&amp;3=comment_node_blog" token="keBJ8wC5_ch_W5ZyE49ix1ZHKxYBhH2cyl8nA3sj2hc"></drupal-render-placeholder> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Mon, 06 Nov 2017 21:17:18 +0000 Gregory Hughlett 688 at https://www.avioconsulting.com Improve Your App Usability By Keeping It Simple https://www.avioconsulting.com/blog/improve-your-app-usability-keeping-it-simple <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/improve-your-app-usability-keeping-it-simple" hreflang="en">Improve Your App Usability By Keeping It Simple</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p dir="ltr">In the frame of building a massive web app for our clients, we may lose the focus on what's really important. As developers, we use to think that the users will read the entire page and then evaluate where do they want to go. But it is a fact of life is that users don't read the entire page in front of them, they run a quick scan and the first reasonable option that they will see, they will make the click. That's why we need to make the pages in an intuitive way.</p> <p dir="ltr">These 6 tips will help you build a strong page:</p> <p dir="ltr"> </p> <h2 dir="ltr"><strong>#1 Follow the conventions</strong></h2> <p dir="ltr">One of the best ways to make almost everything easier is to follow the conventions. In the past 10 years many conventions raised for web pages, as users we expect certain things when we enter to a web page.</p> <p dir="ltr">For instance, where things will be located on a page, users expect the logo identifying the site to be in the top left corner and the primary navigation bar to be across the top or on the left side.</p> <p dir="ltr">Also, we are used to seeing how things work on most pages and we think all pages should behave the same.</p> <p dir="ltr">For instance, when we enter to a place where they sell products we always expect the concepts of the cart to add our desired products and the form where you will upload your payment method.</p> <p dir="ltr"> </p> <h2 dir="ltr"><strong>#2 Add visual hierarchies</strong></h2> <p dir="ltr">Another important advice to make pages easy to scan is to make relations between the things on your page:</p> <ul dir="ltr"><li>which things are most important.</li> <li>which ones are similar and which things are part of other things.</li> </ul><p class="text-align-center" dir="ltr"><b id="docs-internal-guid-b3e54b01-7414-74f5-000d-243157f2ab1e"><img height="274" src="https://lh5.googleusercontent.com/Jd8Q_31yWcOdWZA7vMudlavR_cyMFuCWMjOTsp0oVaz50sgDGPfgrge6_BlQS7hGIukjHqP_qcyKr-NQZLuWyJqRuanCpQDlpHMBJ8OqGm61DDNeCI51rICQ8iR_9i6gWIkFTrHg" width="248" /></b></p> <p> </p> <p> </p> <h2 dir="ltr"><strong>#3 Break up pages into clearly defined areas</strong></h2> <p dir="ltr">Dividing the page into clearly defined areas is important because it allows users to decide quickly which areas of the page to focus and which areas they can safely ignore.</p> <p class="text-align-center" dir="ltr"><img src="https://lh3.googleusercontent.com/llUozcEM-Fw4k5cUlXoMlpwva-sUPDrNQMhHkGiQn3NLNpb_OC9fWVH3epxqVAJuqO05630R4-CMo37xrEtFWMWyH4vR4cOYQ-jHg5VGP0OSvOkwInOS0BtZYwIb2ce1ATTgFQYY" /></p> <h3 dir="ltr"> </h3> <h2 dir="ltr"><strong>#4 Make obvious what's clickable</strong></h2> <p dir="ltr">Since a large part of what people are doing on the web is looking for the next thing to click, it is important to make it easy to tell what's clickable.</p> <p class="text-align-center" dir="ltr"><img src="https://lh5.googleusercontent.com/0hMiJq_k9R8F9x7qmMckxIwklj3a5tv0Phcsabq36yfdqx_YBqRgYPnXIsd2ktnkBPi0M5FRVMp8y52QSBLZgNuiB2Pp6musLuk_vqhwvTSHSF0Yr6hMFj7KXRtorP_kwfgFmV0B" /></p> <p> </p> <h2 dir="ltr"><strong>#5 Omit needless words</strong></h2> <p dir="ltr">Get rid of all the needless words around your application, if you have to explain too much then you are not being simple enough.</p> <p dir="ltr"> </p> <h2 dir="ltr"><strong>#6 How's the navigation in your app?</strong></h2> <p dir="ltr">Wherever you are in your application you should be able to answer the following questions by seeing the elements on the page:</p> <ul dir="ltr"><li>What application is it?</li> <li>In which section am I on?</li> <li>Where can I go from here?</li> <li>Which are the main sections of this application?</li> </ul><p><br />  </p> </div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=687&amp;2=comment_node_blog&amp;3=comment_node_blog" token="uezS2Z6tmisPMYtFETqsxNrmoYNU8SDn53BPzq-OS28"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/other" hreflang="en">Other</a></div> </div> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Tue, 31 Oct 2017 20:19:05 +0000 Alvaro Zorzini 687 at https://www.avioconsulting.com 6 Tips to Make the Most of SOAPUI — Part 1 https://www.avioconsulting.com/blog/6-tips-make-most-soapui-part-1 <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/6-tips-make-most-soapui-part-1" hreflang="en">6 Tips to Make the Most of SOAPUI — Part 1</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p>If you’ve used SOAPUI for any length of time, you’ve probably concluded it’s a really useful tool!  Automated API testing has been figurative manna from the heavens for the testing crowd at AVIO Consulting.  So, since everyone loves a good list, here are 6 tips to make your experience in SOAPUI an even more productive one </p> <p>The first 3 tips (part 1) center on navigation, ease of use, and best practices; the last 3 (part 2) will be based on lessons learned.</p> <p>Ready?  Here we go!</p> <p>1. Two Lefts Don’t Make a Right [Click]</p> <p>2. Maximize Drag-and-Drop</p> <p>3. [Useful] Titling</p> <h2><b>1-Two Lefts Don’t Make a Right [Click]</b></h2> <p>Ok, so we all know that the right mouse button (or its laptop equivalent) is the gateway to some juicy functionality that you’d otherwise have to source from a toolbar or the application menu/sub-menus.  Who has time to move their cursor to the top of the application, though?  Certainly not us!</p> <p>Considering that basic controls such as Move, Delete, and Rename are immediately available and recognizable inputs, this alone makes that all-important right mouse button a productivity turbocharger.  However, there are other cool abilities at your fingertips as well.</p> <h3><b>Add Step</b></h3> <p>Ostensibly simple, yet incredibly rich, this feature allows a user to insert any test step SOAPUI handles in a quick, 2-click operation.  Here’s how you can get to all the beefy goodness.</p> <p>Right-click<b> on an existing test step</b> &gt; Add Step &gt; Select new step</p> <p>What’s Available from This Menu:</p> <ul><li>SOAP Request</li> <li>REST Request</li> <li>HTTP Request</li> <li>AMF Request</li> <li>JDBC Request</li> <li>Properties</li> <li>Property Transfer</li> <li>Conditional Goto</li> <li>Run TestCase</li> <li>Groovy Script</li> <li>Delay</li> <li>SOAP Mock Response</li> <li>Manual TestStep</li> <li>Publish using MQTT</li> <li>Receive MQTT Message</li> <li>Drop MQTT Connection</li> </ul><h3><b>Clone TestCase</b></h3> <p>More than a mere copy function, the Clone TestCase ability prompts the user to precisely place their newly-cloned test case.  If your test cases are as long/complex as ours have become, you’ll understand just how valuable it is to know your cloned test case is exactly where it needs to be from the moment it’s cloned.  SOAPUI manages this by a way of a task dialogue with drop-down menus, and it’s super-useful.  </p> <p>Learn from our mistakes at AVIO — use the Clone TestCase functionality to its fullest advantage.  It’s just a right click away!</p> <h3><b>Export</b></h3> <p>SmartBear loves to tell you SOAPUI produces sharable.XML files so you can collaborate with testing partners.  However, these files can start to get rather large, bogging down the collaboration process.  Never fear, though, because you can export individual test cases, too.</p> <p>This is a great workaround for sharing minor changes with collaborators.  All it takes is a Right Click &gt; Export.  That’s it — you’re done!  </p> <h2><b>2-Maximize Drag-and-Drop</b></h2> <p>SOAPUI allows users to drag and drop test steps for easy test case re-arrangement.  While certain aspects of a test will always take place in the same position, human tasks can sometimes get shuffled during a sprint due to updated requirements.  When that occurs, don’t resign yourself to hours of test case maintenance.  Instead, drag-and-drop those test steps into the new order and keep on testing.</p> <h2><b>3-[Useful] Titling </b></h2> <p>Test Step 1, Test Step 2, and Test Step 3 might sound like a good name.  After all, tests are sequential in nature.  Oh, your boss’ boss doesn’t understand how to connect those titles to the test outcome?  Time to employ a little more creativity and structure!</p> <p>At AVIO, we go out of our way to title our test cases and steps in a very granular way.  In fact, naming conventions are probably one of the most important details to have ironed out before creating the test architecture in SOAPUI.  </p> <p>For example, knowing the sequence of desired activity outcomes in a given test case can become the basis of the test case titles. </p> <p>Ex. 2 - CE = APPROVED; SUBMIT, SUBMIT, RETURN, SUBMIT, APPROVE, SUBMIT</p> <p>When creating the SOAPUI test steps that will comprise this case, I now know how to title each test step because the title of the case reflects the sequence of expected outcomes for each successive test step.</p> <p>Ex. </p> <p><img alt="Example Image 1" data-entity-type="file" data-entity-uuid="a8812d67-3359-4120-b725-46a658377aaa" src="/sites/default/files/inline-images/1.png" /></p> <p>As an added bonus, while using the flexible architecture we build into our test steps, the title of the test step also informs on what outcome should be programmed into the test script itself.  Convenient and specific — that’s a win-win.</p> <p> </p> <p>As always, we want to hear from you, our readers.  Which of the tips above helped the most or the least?  Are you already using these in your daily testing practice?  How can the above be improved for greater productivity and usefulness?</p> </div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=685&amp;2=comment_node_blog&amp;3=comment_node_blog" token="AnAEOlyIjI02lR94A88qXLRmyf8VlofFBplH2pMQLuc"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/other" hreflang="en">Other</a></div> </div> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Mon, 23 Oct 2017 18:49:05 +0000 Mark Hearon 685 at https://www.avioconsulting.com Create app skeletons using Yeoman https://www.avioconsulting.com/blog/create-app-skeletons-using-yeoman <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/create-app-skeletons-using-yeoman" hreflang="en">Create app skeletons using Yeoman</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><h2 dir="ltr" style="margin-top: 10pt; margin-bottom: 0pt;">The Problem</h2> <p dir="ltr" style="margin-top:10pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">Often when starting a new project, a developer can have doubt on how to implement the structure, which patterns to follow or which of the many frameworks should you choose to achieve a single goal when there are hundreds out there. Many times this reason is why the kickstart is so hard.</span></span></span></span></span></span></p> <h2 dir="ltr" style="margin-top: 10pt; margin-bottom: 0pt;">The Solution</h2> <p dir="ltr" style="margin-top:10pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">Use a structure/template generator for applications where you can specify or choose every piece of software that fits your needs.</span></span></span></span></span></span></p> <h2>Introducing Yeoman</h2> <p dir="ltr" style="margin-top:10pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">Yeoman is an open-source development stack to help developers build applications, it runs as a command line interface written for Node.js.</span></span></span></span></span></span></p> <p dir="ltr" style="margin-top:10pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">It uses "generators"</span></span></span></span></span></span></p> <p dir="ltr" style="margin-top:10pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">Yeoman generators are created to let you define app templates to:</span></span></span></span></span><br class="kix-line-break" /><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">* Rapidly create a new project</span></span></span></span></span><br class="kix-line-break" /><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">* Create modules or packages</span></span></span></span></span><br class="kix-line-break" /><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">* Enforcing standards, best practices and style guides</span></span></span></span></span><br class="kix-line-break" /><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">* Promote new projects by letting users get started with a sample app</span></span></span></span></span></span></p> <p dir="ltr" style="margin-top:10pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">Besides being an open-source project they have multiple templates to start with. So instead of creating your own template, let's say you want a classic MVC java spring angular template. You can search for different types of generators in </span></span></span></span></span><a href="http://yeoman.io/generators/" style="text-decoration-line:none"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#1155cc"><span style="text-decoration-line:underline"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">http://yeoman.io/generators/</span></span></span></span></span></span></a><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap"> and find the one that fits you.</span></span></span></span></span></span></p> <p class="text-align-center" dir="ltr" style="margin-top:10pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap"><img src="https://lh4.googleusercontent.com/pEedHHgEV2m9oUYGmV2-zl3gx__23sX144EePaDArnF7DeQSjxVzH-naep9qq7tMWcqv1xOFdLMGe312LAm413hFspiJ2d8K2o0cl5awbamDC5bfKbiwbTlf3Kdo68o48O-zgiWW" style="border:none; transform:rotate(0.00rad); -webkit-transform:rotate(0.00rad); width:624px; height:416px" /></span></span></span></span></span></span></p> <p dir="ltr" style="margin-top:10pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">Inside every generator, there's a webpage or a GitHub with the description of the structure, tools and builds included. </span></span></span></span></span></span></p> <p dir="ltr" style="margin-top:10pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">For instance: JHipster which is a Spring Boot + Angular</span></span></span></span></span></span></p> <p class="text-align-center" dir="ltr" style="margin-top:10pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap"><img src="https://lh6.googleusercontent.com/eMOs4O81rdQAYdtdG-QZVubJHZloIta4sChc_2nj60p95HPWnompzRHMqeneeL-xduyaXqaYUOAAngNECRsTKFIYH_WDfUu83WuzQVQomWFNSUCepLnuTla9vTzQ7fDAmZX7vVWc" style="border:none; transform:rotate(0.00rad); -webkit-transform:rotate(0.00rad); width:624px; height:420px" /></span></span></span></span></span></span></p> <p> </p> <p dir="ltr" style="margin-top:0pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">Once you find the generator that fit your needs you can create the whole structure from it.</span></span></span></span></span></span></p> <p><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">Make sure you have installed yeoman with: </span></span></span></span></span></span></p> <pre> <code>npm install -g yo</code></pre> <p dir="ltr" style="margin-top:0pt; margin-bottom:0pt"> </p> <p dir="ltr" style="margin-top:0pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">Generators are npm packages named generator-nameofthegenerator</span></span></span></span></span></span></p> <p><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">In our case to install the JHipster we need to execute</span></span></span></span></span></span></p> <pre> <code>npm install -g generator-jhipster</code></pre> <p dir="ltr" style="margin-top:0pt; margin-bottom:0pt"> </p> <p dir="ltr" style="margin-top:0pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">And then in the desired directory we do</span></span></span></span></span></span></p> <pre> <code>yo jhipster</code></pre> <p dir="ltr" style="margin-top:0pt; margin-bottom:0pt"> </p> <p dir="ltr" style="margin-top:10pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">Right after the generator will ask a series of questions to customize the new project as of:</span></span></span></span></span></span></p> <p class="text-align-center" dir="ltr" style="margin-top:10pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap"><img src="https://lh5.googleusercontent.com/wBtLInvb8eLY8sc4eEo1P_nM1KFEMtqytjf983gRwPZur1g3twwJtTFqpEdyLlywMFVBsIHiMzMVoZHVJAhXLFwTklsmVzGFt3huph0xRFBUrkjhAY-qP0efiOLS9BswqQ2sqLSm" style="border:none; transform:rotate(0.00rad); -webkit-transform:rotate(0.00rad); width:624px; height:316px" /></span></span></span></span></span></span></p> <p dir="ltr" style="margin-top:10pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">And we can check that the whole structure was created as expected.</span></span></span></span></span></span><br />  </p> <p class="text-align-center" dir="ltr" style="margin-top:0pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap"><img src="https://lh4.googleusercontent.com/jkesBIRA3id15q6G-fhRBGsjIej1wZLdsmilkN4rrIdE5YCOeKX2rO4XUp1S1Re3JgODDtZlYWbOC4oj2GQ9i7NCYuJXm0Op540vJ6e75A4asylx23Epqi6d-Ki2LG6U64LmC_w5" style="border:none; transform:rotate(0.00rad); -webkit-transform:rotate(0.00rad); width:624px; height:132px" /></span></span></span></span></span></span></p> <p dir="ltr" style="margin-top:0pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap">Besides the great use of the generators to start projects in no time, I found this tool really helpful to start playing with webapps. When building a front-end application there are thousands of options to use and if you really want to give a try a certain configuration without getting into the full details of what the framework-library-building tool does or how the structure should look like. This is a really good approach.</span></span></span></span></span></span></p> <p dir="ltr" style="margin-top:0pt; margin-bottom:0pt"><span style="line-height:1.68"><span style="font-size:11pt"><span style="font-family:Roboto"><span style="color:#666666"><span style="vertical-align:baseline"><span style="white-space:pre-wrap"><img src="https://lh5.googleusercontent.com/rAvZOI7rtGC2RGccPtAN1tlvLZoVF519Bar7NjH092raHq6z5TSQnKdsZGxwyZXyX3HUzFQdMUvCfXEMURS3HnUihsoU5LTbV524mRGIV28iF7buPmU7V6sMBWwh5j_n2iiavaao" style="border:none; transform:rotate(0.00rad); -webkit-transform:rotate(0.00rad); width:374px; height:324px" /></span></span></span></span></span></span></p> <div> </div> </div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=674&amp;2=comment_node_blog&amp;3=comment_node_blog" token="Lci3E0szv4lrFgiMJuTDLuxK8KEJHIACtNMPEMp5kss"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/other" hreflang="en">Other</a></div> </div> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Mon, 21 Aug 2017 14:53:08 +0000 Alvaro Zorzini 674 at https://www.avioconsulting.com Automatically cleanup those archive files https://www.avioconsulting.com/blog/automatically-cleanup-those-archive-files <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/automatically-cleanup-those-archive-files" hreflang="en">Automatically cleanup those archive files</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><h1>Spring cleanup of archive files!</h1> <p> </p> <p>During a project, we casually gathered <em>waaaay</em> too many archive files.  These were intentionally stored, however, in development and testing environments, they became a nuisance, and took up too much space.  Occasionally the Ops team would send out an email saying that disk space was full, and it was time to do some cleanup.</p> <p>I created a fairly simple script (see below) that searches some directories for specific files/file types, and lists them out, or optionally deletes them.  After creating the script for my specific requirement, I went back and added options for more re-usability.  In our scenario, we were storing some temp files under a '<em>/mnt/edi/tmp</em>' directory, and archives under a '<em>staging</em>' directory.</p> <p>Using the 'find' command under Linux, we were able to locate files that exceeded a certain age, and then delete them.</p> <p> </p> <p>**<em>You will need to modify the script to point to your specific directories!</em></p> <p> </p> <p>Here are some common usages:</p> <p><strong>Help</strong></p> <p>Take a look at the command options.</p> <pre> <code>:~/scripts$ ./cleanup.sh -h ************************************ Cleanup command line options: -d : actually delete the files. -l : list the files for deletion. -p : does not prompt for deletion. -f : forces the deletion. -t n : where n is number of days old. Defaults to 7 -h : displays these instructions. ************************************</code></pre> <p><strong>List</strong></p> <p>List out the files that would be deleted.</p> <pre> <code> :~/scripts$ ./cleanup.sh -l Thu Aug 3 09:27:17 MDT 2017 Looking for files older than 7 days. checking /mnt/edi/tmp directory. 4 files found for destruction checking /mnt/edi/Eligibility/*/staging directories. 0 files found for destruction Files to delete... /mnt/edi/tmp/FS0A9B8D1115D7F4987590000038F07287.payload /mnt/edi/tmp/FS0A9B8D1115D7B03AB080000038F06582.payload /mnt/edi/tmp/FS0A9B8D1115D7F4988260000038F07296.payload /mnt/edi/tmp/FS0A9B8D1115D7F4988150000038F07293.payload </code></pre> <p><strong>Delete</strong></p> <p>Actually, delete the files (add the -p command to not prompt).</p> <pre> <code>:~/scripts$ ./cleanup.sh -dp Thu Aug 3 09:29:00 MDT 2017 Looking for files older than 7 days. checking /mnt/edi/tmp directory. 10 files found for destruction checking /mnt/edi/Eligibility/*/staging directories. 0 files found for destruction ******************************* Deleting files. ******************************* </code></pre> <h3> </h3> <h3>Cleanup.sh bash script</h3> <p>Please, please test this thoroughly before applying it to your environment!</p> <pre> <code>#!/bin/bash prompt="-i" mtime="7" while getopts "dlhpft:" opt; do case $opt in d) doDelete="true" ;; l) listfiles="true" ;; h) listhelp="true" ;; p) prompt="" ;; f) force="-f" ;; t) mtime="$OPTARG" ;; esac done if [ "$listhelp" == "true" ]; then echo "************************************" echo "Cleanup command line options:" echo " -d : actually delete the files." echo " -l : list the files for deletion." echo " -p : does not prompt for deletion." echo " -f : forces the deletion." echo " -t n : where n is number of days old. Defaults to 7" echo " -h : displays these instructions." echo "************************************" exit fi echo "$(date) Looking for files older than" $mtime "days." echo "checking /mnt/edi/tmp directory. " `find /mnt/edi/tmp -name *.payload -mtime +$mtime | wc -l` " files found for destruction" echo "checking /mnt/edi/Eligibility/*/staging directories. " `find /mnt/edi/Eligibility/*/staging -name "*.*" -mtime +$mtime | wc -l` " files found for destruction" if [ "$listfiles" == "true" ]; then echo "" echo "Files to delete..." find /mnt/edi/tmp -name *.payload -mtime +$mtime find /mnt/edi/Eligibility/*/staging -name "*.*" -mtime +$mtime fi if [ "$doDelete" == "true" ]; then echo "" echo "*******************************" echo " Deleting files." echo "*******************************" find /mnt/edi/tmp -name *.payload -mtime +$mtime -exec rm $prompt $force {} \; find /mnt/edi/Eligibility/*/staging -name "*.*" -mtime +$mtime -exec rm $prompt $force {} \; fi </code></pre> <p> </p> <h3>Bonus Option: Automatically Schedule this using Cron!</h3> <p>Execute '<em>crontab -e</em>' and add an entry to run this automatically.  This sample entry runs the script every day at noon, deleting, non-prompting, and listing out the files while logging all actions to a cleanup.log file!</p> <pre> <code>0 12 * * * /home/oracle/scripts/cleanup.sh -dpl &gt;&gt; /home/oracle/scripts/cleanup.log 2&gt;&amp;1</code></pre> <p> </p> <p>Also, check out how to <a href="http://www.avioconsulting.com/blog/automatically-rotate-managed-server-log-files">Automatically Rotate Managed Server Log Files</a>!</p> </div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=670&amp;2=comment_node_blog&amp;3=comment_node_blog" token="Nx5aMWK02EejWpp9GB2_3q5q2zh2Oh7tzyzZz-27Tcg"></drupal-render-placeholder> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Thu, 03 Aug 2017 15:34:29 +0000 Kevin King 670 at https://www.avioconsulting.com Automatically Rotate Managed Server Log Files https://www.avioconsulting.com/blog/automatically-rotate-managed-server-log-files <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/automatically-rotate-managed-server-log-files" hreflang="en">Automatically Rotate Managed Server Log Files</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p>Eventually, without any involvement, log files will get out of hand.  Oracle published in the <a href="https://docs.oracle.com/middleware/1221/core/ASADM/logs.htm#ASADM215">Lifecycle Management</a> guide ways to configure the diagnostic logging, however, the ".out" files aren't covered.</p> <p>Sure, you can just go in and delete them occasionally, but why can't this be done automatically?</p> <p>It can!</p> <p>*Of note: this can guide is for servers running Linux!</p> <h3><strong>Enter Logrotate!</strong></h3> <p>"<a href="http://www.linuxcommand.org/man_pages/logrotate8.html">logrotate</a> is designed to ease administration of systems that generate large numbers of log files. It allows automatic rotation, compression, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or when it grows too large."</p> <p>Following those instructions was fairly easy, but I'll post what I did here!</p> <p>First create a configuration file (name it whatever you'd like, I went with logrotate.conf)</p> <pre> <code> compress /opt/oracle/config/domains/*/servers/*/logs/*.out { rotate 5 missingok notifempty size=5M copytruncate sharedscripts postrotate find /opt/oracle/config/domains/*/servers/*/logs -name "*.out0*" -exec rm {} \; endscript }</code></pre> <p>Make sure it points to your managed server log directories.</p> <p>I added a few additional options in the configuration, compress, copytruncate, etc.  These help keep things under control.  See logrotate documentation for more details.</p> <p>I also put in a postrotate script to remove old out files that are generated on restarts.  You can also update the find command with a -mtime +7 to only remove the files older than 7 days.</p> <p>Now that the script is configured, let's schedule it to run automatically!</p> <h3>Enter Cron!</h3> <p>We are going to use <a href="http://man7.org/linux/man-pages/man1/crontab.1.html">Crontab</a>, to 'install a crontab table file', which is used for cron jobs.</p> <p>Lets insert a record into crontab ("crontab -e") </p> <pre> <code> */30 * * * * /usr/sbin/logrotate -s /home/oracle/scripts/logrotate.status /home/oracle/scripts/logrotate.conf</code></pre> <p>Now logrotate will automatically run every 30 minutes!</p> <p> </p> <p>Checkout the log directory after a few days!</p> <p><img alt="log directory" data-entity-type="file" data-entity-uuid="1e27939c-db07-4260-841e-8f539e434eac" src="/sites/default/files/inline-images/directoryListing.png" /></p> <p> </p> <p>Also, check out my blog <a href="http://www.avioconsulting.com/blog/automatically-cleanup-those-archive-files">Automatically cleanup archive files!</a></p> </div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <a id="comment-1830"></a> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"> <div>kalyani More</div> </div> <div class="comment-date"> <div>August 31, 2017</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Informative Article</p></div> </div> </div> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=669&amp;2=comment_node_blog&amp;3=comment_node_blog" token="WOT635QglwPRoNsHJw0g351eP0j_uk9TsuLghFo5MpI"></drupal-render-placeholder> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Thu, 03 Aug 2017 14:53:00 +0000 Kevin King 669 at https://www.avioconsulting.com