title,body,link,tags,view_count,is_answered,score,answer_count
Run AutoIT script in silent mode,"<p>I have an AutoIT script that will automate all the system testing configurations in my company. It works fine without any user interaction however I am wondering if it will be possible to run in silent mode as the script contains quite a few mouseclicks.</p>
<p>Here is a code snippet:</p>
<pre><code>Run(&quot;C:\AutoTestPackage\TestSuite\SmokeTest\WCF\Prerequisite\BISSDK\WcfClient.TestApp.exe&quot;)
_WinWaitCheck($WCFClient)
WinActivate($WCFClient)
WinMove($WCFClient, &quot;&quot;, 64, 200, 1200, 600)
Sleep(1000)
    
MouseClick(&quot;&quot;, 400, 60, 1) ;Click on Username textbox
Sleep(250)
Send($OperatorName)
Sleep(500)
MouseClick(&quot;&quot;, 700, 60, 1) ;Click on Password textbox
Sleep(250)
Send($FinalOperatorPassword)
Sleep(1000)
    
MouseClick(&quot;&quot;, 1080, 50, 1) ;Click on Ping option
Sleep(1000)
    
MouseClick(&quot;&quot;, 70, 74, 1); Click on SynchronLogon
Sleep(1000)
</code></pre>
<p>Any help would be greatly appreciated :)</p>
",https://stackoverflow.com/questions/65128234/run-autoit-script-in-silent-mode,"['scripting', 'autoit', 'silent']",198,False,0,0
How can I test web push notifications in rails 6?,"<p>I'd like to test push notifications in a rails app, which I send by ActionCable. I'm using rspec.</p>

<ul>
<li>How do I test that are received by certain users? </li>
<li>Can I test it with capybara? </li>
<li>Can I write system-testing for it?</li>
<li>Can I test it with rspec?</li>
<li>Do I need to install JS testing?</li>
<li>Any other info I might need to have in mind.</li>
</ul>
",https://stackoverflow.com/questions/61566103/how-can-i-test-web-push-notifications-in-rails-6,"['javascript', 'rspec', 'capybara', 'ruby-on-rails-6', 'actioncable']",397,False,0,1
Integration testing involving rabbitmq,"<p>I need help on how to write integration testing involving the rabbitMQ message broker.</p>

<p>This is the overall system architecture</p>

<p>Service(Producer) --> Message Borker(Environment 1) --> Controllers(Our Application) --> Message Broker(Environment 2) --> Consumer Devices</p>

<p>I am planning to place my integration testing programs at the service level wherein I will mimic a message to be sent to a Message broker. Later I will listen for the response and assert it.</p>

<p>Though its an asynchronous system, testing synchronous way seems to be an easy approach.</p>

<p>Is there any better approach to do the integration testing for my application flow. Could you please give me pointers for integration testing. </p>

<p>Thanks
Bala.</p>
",https://stackoverflow.com/questions/60076615/integration-testing-involving-rabbitmq,"['java', 'spring', 'rabbitmq']",768,False,0,1
Tuning Regex to tune out email addresses but keep certain user names,"<p>I need help in tuning a regex that is looking for certain matches on usernames and passwords that should not be passed in the clear. The usernames have a certain pattern to follow, 6 char in length, some can start with a letter of m, and other single letters. The passwords can be 6 - 12 characters in length. Not really looking for a password per-say, but something after a hit on a key username pattern that matches the hunt pattern. This regex code is pretty close. On my internal system testing, it does indeed hit on username/passwords the expected way with no issues, however, on regex101.com, and internally, it also hits on email addresses, and I don't want it too. TIA for any and all help.</p>

<p>Here is the Regex.</p>

<blockquote>
  <p><code>(([a-zA-Z]{2}\d{3}[a-zA-Z0-9]{1}\b|assword|username|[mts]\d{5}\b|[a-zA-Z0-9\_.+\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+)[^\&gt;:\/\\.0-9]{1,8}[a-zA-Z]{1}[a-zA-Z0-9!@#$%^&amp;*\_\-\+\=]{6,12})|([a-zA-Z]{1}[a-zA-Z0-9!@#$%^&amp;*\_\-\+\=]{6,12}[^:\/\\.0-9]{1,8}([a-zA-Z]{2}\d{3}[a-zA-Z0-9]{1}\b|assword|username|[mts]\d{5}\b|[a-zA-Z0-9\_.+\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+))</code></p>
</blockquote>

<p>Here is a test I send through internal testing systems and also in part what I run through regex101.com</p>

<pre><code>m12345 u/gibberish12
m23456 pa$$werd
m34567 #password20
m08943 $secretstuf
mailmon@abc1234
mirror@abc1234
</code></pre>

<p>The following is an example of the type of email address it hits on, and shouldn't and this needs to get tuned out and keep the other hits:</p>

<pre><code>&lt;abcdefghijklmnopq@test.domainname.com-mail.com&gt;
</code></pre>
",https://stackoverflow.com/questions/59635317/tuning-regex-to-tune-out-email-addresses-but-keep-certain-user-names,['regex'],43,True,0,1
Node.js read/write stream skipping the first line on write,"<p>I wrote a simple utility to convert a somewhat weird json file (multiple objects not in an array) to csv for some system testing purposes. The read and transformation themselves are fine, and the resulting string is logged to the console correctly, but sometimes the resulting csv file is missing the first data line (it shows header, 1 blank line, then rest of data). I'm using read and write streams, without any provisions for backpressure. I don't think the problem is backpressure, since only the 1st line gets skipped, but I could be wrong. Any ideas?</p>
<pre><code>const fs = require('fs');
const readline = require('readline');
const JSONbig = require('json-bigint');

// Create read interface to stream each line
const readInterface = readline.createInterface({
    input: fs.createReadStream('./confirm.json'),
    // output: process.stdout,
    console: false
});

const writeHeader = fs.createWriteStream('./confirm.csv');
const header = &quot;ACTION_TYPE,PROCESS_PICK,TYPE_FLAG,APP_ID,FACILITY_ID,CONTAINER_ID,USER_ID,CONFIRM_DATE_TS,PICK_QTY,REMAINING_QTY,PICK_STATUS,ASSIGNMENT_ID,LOCATION_ID,ITEM_ID,CLUSTER_ID,TOTAL_QTY,TOTAL_ITEMS,WAVE_NBR,QA_FLAG,WORK_DIRECTIVE_ID\n&quot;;
writeHeader.write(header);

// Create write interface to save each csv line
const writeDetail = fs.createWriteStream('./confirm.csv', {
    flags: 'a'
});

readInterface.on('line', function(line) {
    let task = JSONbig.parse(line);
    task.businessData.MESSAGE.RECORD[0].DETAIL.REG_DETAIL.forEach(element =&gt; {
        let csv = &quot;I,PTB,0,VCO,PR9999999011,,cpicker1,2020121000000,&quot; + element.QUANTITYTOPICK.toString() + &quot;,0,COMPLETED,&quot; +
            task.businessData.MESSAGE.RECORD[0].ASSIGNMENTNUMBER.toString() + &quot;,&quot; + element.LOCATIONNUMBER.toString() + &quot;,&quot; +
            element.ITEMNUMBER.toString() + &quot;,,,,&quot; + 
            task.businessData.MESSAGE.RECORD[0].WAVE.toString() + &quot;,N,&quot; + element.CARTONNUMBER.toString() + &quot;\n&quot;;
        
        console.log(csv);
        try {
            writeDetail.write(csv);    
        } catch (err) {
            console.error(err);
        }
    });
});
</code></pre>
<p>Edit: Based on the feedback below, I consolidated the write streams into one (the missing line was still happening, but it's better coding anyway). I also added a try block around the JSON parse. Ran the code several times over different files, and no missing line. Maybe the write was happening before the parse was done? In any case, it seems my problem is resolved for the moment. I'll have to research how to properly handle backpressure later. Thanks for the help.</p>
",https://stackoverflow.com/questions/65256825/node-js-read-write-stream-skipping-the-first-line-on-write,['node.js'],989,False,0,1
Safe to clean out C:\ProgramData\firebird folder when FB offline?,"<p>Is it safe to clean out the contents of the <code>C:\ProgramData\firebird</code>
folder, i.e. wipe it, when the Firebird service (superserver, v3.0) is not
running?</p>

<p>I understand that it contains lock tables etc. so should not be touched
while FB is running. But it's not clear to me if it can be wiped safely
when FB is <em>not</em> running, or if it contains data that can be vital when FB
starts up again.</p>

<p>My situation is that I'm migrating a VM with an FB installation.
Migration has been done like this, due to practical reasons (uptime vs.
file transfer &amp; VM conversion time):</p>

<ol>
<li><p>Snapshot of source VM, i.e. nightly backup is copied to new location.
Source stays up and running. Copy process takes about 1 day. (We have the databases locked with nbackup when nightly snapshot is taken).</p></li>
<li><p>Snapshot is unpacked at target location, converted from VMWare to
HyperV and brought online for additional reconfig and system testing.</p></li>
<li><p>A few days pass.</p></li>
<li><p>Both source and target Firebird services are stopped, so no database
activity is going on anywhere.</p></li>
<li><p>Sync files from source to target, including database files. This file
transfer is much smaller then in step 1 so it can be done during offline
time.</p></li>
</ol>

<p>In step 5 I find diffs in the <code>C:\ProgramData\firebird</code> folder, and I'm
wondering what would be the best approach:</p>

<p>A) Wipe the folder at target.</p>

<p>B) Sync so target has the same content as source.</p>

<p>C) Leave target as is.</p>

<p>Please note that when FB service is started again at <em>target</em>, the
database files will be identical with those at the <em>source</em> at the time of
FB shutdown, and probably won't ""match"" the contents of
<code>C:\ProgramData\firebird</code> at <em>target</em>. I would assume that this fact rules
out option C). </p>
",https://stackoverflow.com/questions/59692516/safe-to-clean-out-c-programdata-firebird-folder-when-fb-offline,"['windows', 'database-migration', 'firebird', 'firebird-3.0', 'programdata']",1143,True,0,1
