codemonth blog codemonth blog - One project every month - making stuff better. https://codemonth.dk/code_is_good/ Tue, 20 Nov 2018 17:16:36 +0700 Tue, 20 Nov 2018 17:16:36 +0700 30 From production to test in a minute https://codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13394:From-production-to-test-in-a-minute 79C39CEA811959F2E050007F0100570D Sat, 03 Nov 2018 00:00:00 +0700 How to create test data just like your production data without moving or copying your actual data. Creating complete synthetic test data sets from production data https://codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13393:Creating-complete-synthetic-test-data-sets-from-production-data 6E2555C6EE23D371E050007F010022CA Sat, 09 Jun 2018 00:00:00 +0700 How easy could it be to generate a complete set of test data from existing tables? To make sure that data looks like production but in no way is a copy or scramble of production data. Instead it is synthetically created, to look like what your production data looks like. Same types, same data domain, same coherence between values, same data distribution and also maintaining the relationships (foreign keys) between all the tables simulating. How-to generate random finance data https://codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13392:How-to-generate-random-finance-data 691C9FEEB06458BFE050007F01001251 Thu, 05 Apr 2018 23:40:47 +0700 This time I demo how you can generate random financial data, to create test data for financial or commerce applications. How to generate random names, birth dates and more https://codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13391:How-to-generate-random-names,-birth-dates-and-more 68E0485EDA1E0379E050007F01000407 Mon, 02 Apr 2018 22:21:34 +0700 Quick demo video showing how to generate random data related to persons, such as names (first, middle and last names), birth dates, job titles and more. How to use the core functionality of RANDOM_NINJA https://codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13390:How-to-use-the-core-functionality-of-RANDOM_NINJA 677491873FBB5D19E050007F010044B8 Mon, 19 Mar 2018 22:41:22 +0700 In the second video on RANDOM_NINJA I show how to use the core functionality in the 3 main packages: core_random, text_random and time_random. Video demo of installing RANDOM_NINJA https://codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13389:Video-demo-of-installing-RANDOM_NINJA 677491873FBA5D19E050007F010044B8 Thu, 15 Mar 2018 21:36:51 +0700 First video in a longer series on how to install, use and extend RANDOM_NINJA. This one, is a quick one simply showing how to install the package. Video demo of creating test data using TESTDATA_NINJA https://codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13388:Video-demo-of-creating-test-data-using-TESTDATA_NINJA 66FD75D0B6CE45DEE050007F01002BE4 Fri, 09 Mar 2018 23:29:02 +0700 First quick video demonstrating what my test data package can do. Create your Oracle test data using JSON and PLSQL https://codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13387:Create-your-Oracle-test-data-using-JSON-and-PLSQL 66E74596504E7B8DE050007F01005FD1 Thu, 08 Mar 2018 21:01:10 +0700 For a long time the only way to create a generator using the testdata_ninja package, was using a pure text based syntax. It was using special characters and was maybe a bit obscure and not user friendly. The reason for this was that the databases I needed this package on, was running Oracle 10 and 11. So I needed the package to be compatible with those versions, and JSON is not supported natively. Looking at the requirements, it would be a good fit for JSON though. So recently when I needed to run this on Oracle version 12, I had the chance to finally add JSON support. It makes it a lot more easy to write the generator definitions, as you can see in the below examples. Quick lists when generating test data using plsql https://codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13386:Quick-lists-when-generating-test-data-using-plsql 6699135DA5238E98E050007F01002F96 Sun, 04 Mar 2018 23:45:21 +0700 One of the outstanding issues that I have had on the testdata_ninja library, was the ability to do quick lists. A short list of possible values, like a status column or open/close kind of values. Predictable random test data using plsql https://codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13385:Predictable-random-test-data-using-plsql 66666DE25F9D127EE050007F01004B89 Fri, 02 Mar 2018 11:18:34 +0700 One of the problems in using random generated test data, is that it is random. Because sometimes what you need is test data that is the same every time you generate it. This entry will look at how you can achieve this using the seed functionality of the dbms_random package. Update to RANDOM_NINJA. Enables you to create even more random production like test data using pl/sql. https://codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13384:Update-to-RANDOM_NINJA.-Enables-you-to-create-even-more-random-production-like-test-data-using-pl/sql. 656744CF134F8027E050007F01007CB9 Sat, 17 Feb 2018 18:54:00 +0700 Had a chance to finish the data generators that I had on my list for release 1.4 of <a href="https://github.com/morten-egan/random_ninja"> RANDOM_NINJA</a>. New data domain additions include random science data, random game data, investment data and medical data. Read below for a full list of the current functionality. More will be added for release 1.5. Creating synthetic and random test data from an existing table https://codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13383:Creating-synthetic-and-random-test-data-from-an-existing-table 640173C74DBB2AFEE050007F01002D0F Tue, 30 Jan 2018 23:58:00 +0700 We have all been there at some point. Either we need to run a test but can't bring production data outside of the production network or we need to produce a test case for a support organization that are not allowed to view production data. What to do? Random null value in plsql generated data https://codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13382:Random-null-value-in-plsql-generated-data 55DB7F809BFA12E3E050007F0100789A Thu, 03 Aug 2017 22:51:44 +0700 I have added another small feature to the testdata library. The ability to create random data is good, but sometimes you also need to have "gaps" in that data. So I made it possible to randomly create null instead of a value for any generated field. Simply surround the generator function in parentheses and add how big a percentage the chance are of a null value after the parentheses. Topological sorting in PLSQL https://codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13381:Topological-sorting-in-PLSQL 559E1D040547AF77E050007F01002209 Mon, 31 Jul 2017 21:36:54 +0700 For my <a href="http://www.codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth:::20::Easily-generate-millions-of-rows-of-random-test-data-using-a-PLSQL-API.">testdata_ninja</a> library, I recently created the <a href="http://www.codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13379:PLSQL-Test-data-generators-with-auto-back-reference-fields">field auto reference feature</a>, where a value from one field can be used as an input to a generator for another field. Part of this feature involves parsing all columns and building a dependency list (<a href="https://en.wikipedia.org/wiki/Topological_sorting">Directed Acyclic Graph</a>) sorting all columns correctly. Since everything in the library is build purely in plsql, I don't store anything in tables. So if my data is not in a table, I cannot use sql as one would normally do it. I couldn't find any code out there that did what I wanted, so like much of the other stuff I do, I had to build it myself. Chinese support added to parts of the plsql random data generator https://codemonth.dk/code_is_good/dev_qa_prod.assert?condition=codemonth::::13380:Chinese-support-added-to-parts-of-the-plsql-random-data-generator 54D58D26DB2A1FC6E050007F01003861 Fri, 21 Jul 2017 22:19:12 +0700 For quite a while I have been wanting to add Chinese support to some of the dbms_random functions, and this last weekend I finally got some time to work a little bit on it. So now the library support Chinese output in functions in the core_random package, text_random package and location_random package.