title,body,link,tags,view_count,is_answered,score,answer_count
System Testing a Mongoose Server,"<p>I'm curious as to the best/correct way to setup System level black-box tests for a Mongoose C++ based Web Application project I've been working on. This needs to run in an automatic way within a jenkins script.</p>

<p>The idea is to run something like:</p>

<pre><code>1. Start the server
2. Submit HTTP Get requests with predefined query parameters
3. Check that the result is as expected.
4. Run (2), (3) with different combinations
5. Close the server
</code></pre>

<p>One possible way to do this is to whip up a python script which runs the executable generate by <code>make</code>, runs the tests and then kills the spawned process. </p>

<p>Is there a better/more structured way of doing this(and accompanying tools/libraries) either using Python or C++?</p>
",https://stackoverflow.com/questions/52139148/system-testing-a-mongoose-server,"['c++14', 'mongoose-web-server']",76,FALSE,0,0
Common Lisp and ASDF System Testing,"<p>I am wondering how one runs tests using ASDF. Suppose we have the following system definition. What command would I run to run the tests?</p>

<p>I have tried running things like <code>(asdf:compile-system cl-mongo)</code> and <code>(asdf:load-system cl-mongo)</code> but it does not become apparent how to test.  If it helps, the code comes from <a href=""https://github.com/fons/cl-mongo"" rel=""nofollow noreferrer"">this</a> repository.</p>

<p>Should I somehow be compiling and loading the test system as well?</p>

<pre><code>   (in-package #:cl-user)

(defpackage #:cl-mongo-system (:use #:cl #:asdf))

(in-package #:cl-mongo-system)

(asdf:defsystem #:cl-mongo
  :name   ""cl-mongo""
  :author ""Fons Haffmans; fons.haffmans@gmail.com""
  :version ""0.7""
  :licence ""MIT""
  :description ""lisp system to interact with mongodb, a non-sql db""
  :depends-on (:uuid
           :babel
           :bordeaux-threads
           :documentation-template
           :lisp-unit
           :parenscript
           :split-sequence
           :usocket)
  :serial t
  :components 
 ((:module ""src""
    :serial t
    :components ((:file ""packages"")
         (:file ""octets"")
         (:file ""pair"")
         (:file ""encode-float"")
         (:file ""bson-oid"")
         (:file ""bson-binary"")
         (:file ""bson-time"")
         (:file ""bson-regex"")
         (:file ""bson-code"")
         (:file ""bson"")
         (:file ""bson-decode"")
         (:file ""bson-array"")
         (:file ""document"")
         (:file ""mongo-syntax"")
         (:file ""java-script"")
         (:file ""bson-encode-container"")
         (:file ""protocol"")
         (:file ""mongo"")
         (:file ""db"")
         (:file ""mem"")
         (:file ""do-query"")
         (:file ""doc"")
         (:file ""map-reduce"")
         (:file ""shell"")))
   (:static-file ""README.md"")
   (:static-file ""COPYING"")))

(asdf:defsystem #:cl-mongo-test
  :name   ""cl-mongo""
  :author ""Fons Haffmans; fons.haffmans@gmail.com""
  :version ""0.7""
  :licence ""MIT""
  :description ""testing cl-mongo""
  :depends-on (:cl-mongo)
  :serial t
  :components 
  ((:module ""test""
    :serial t
    :components ((:file ""package"")
         (:file ""test-utils"")
         (:file ""regression"")))))
</code></pre>

<p>As requested, I am including the error I receive when I run <code>(asdf: compile-system 'cl-mongo-test)</code></p>

<pre><code>COMPILE-FILE-ERROR while
compiling #&lt;CL-SOURCE-FILE ""cl-mongo-test"" ""test"" ""regression""&gt;
   [Condition of type UIOP/LISP-BUILD:COMPILE-FILE-ERROR]

Restarts:
 0: [RETRY] Retry compiling #&lt;CL-SOURCE-FILE ""cl-mongo-test"" ""test"" ""regression""&gt;.
 1: [ACCEPT] Continue, treating compiling #&lt;CL-SOURCE-FILE ""cl-mongo-test"" ""test"" ""regression""&gt; as having been successful.
 2: [RETRY] Retry ASDF operation.
 3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
 4: [RETRY] Retry SLIME REPL evaluation request.
 5: [*ABORT] Return to SLIME's top level.
 --more--

Backtrace:
  0: (UIOP/LISP-BUILD:CHECK-LISP-COMPILE-RESULTS NIL T T ""~/asdf-action::format-action/"" ((#&lt;ASDF/LISP-ACTION:COMPILE-OP &gt; . #&lt;ASDF/LISP-ACTION:CL-SOURCE-FILE ""cl-mongo-test"" ""test"" ""regression""&gt;)))
  1: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #&lt;unavailable argument&gt; #&lt;unavailable argument&gt; #&lt;ASDF/LISP-ACTION:COMPILE-OP &gt; #&lt;ASDF/LISP-ACTION:CL-SOURCE-FILE ""cl-mongo-test"" ""test"" ""regression""&gt;)
  2: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)) #&lt;ASDF/LISP-ACTION:COMPILE-OP &gt; #&lt;ASDF/LISP-ACTION:CL-SOURCE-FILE ""cl-mongo-test"" ""test"" ""regression""&gt;) [fast-method]
  3: ((:METHOD ASDF/PLAN:PERFORM-PLAN (LIST)) ((#1=#&lt;ASDF/LISP-ACTION:COMPILE-OP &gt; . #2=#&lt;ASDF/LISP-ACTION:CL-SOURCE-FILE #3=""cl-mongo"" #4=""src"" ""shell""&gt;) (#5=#&lt;ASDF/LISP-ACTION:LOAD-OP &gt; . #2#) (#1# . #6=..
  4: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
  5: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) ((#1=#&lt;ASDF/LISP-ACTION:COMPILE-OP &gt; . #2=#&lt;ASDF/LISP-ACTION:CL-SOURCE-FILE #3=""cl-mongo"" #4=""src"" ""shell""&gt;) (#5=#&lt;ASDF/LISP-ACTION:LOAD-OP &gt; . #2#) (#1# ..
  6: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
  7: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) #&lt;ASDF/PLAN:SEQUENTIAL-PLAN {10049ED323}&gt;) [fast-method]
  8: ((:METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)) #&lt;ASDF/LISP-ACTION:COMPILE-OP &gt; #&lt;ASDF/SYSTEM:SYSTEM ""cl-mongo-test""&gt;) [fast-method]
  9: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #&lt;unused argument&gt; #&lt;unused argument&gt; #&lt;ASDF/LISP-ACTION:COMPILE-OP &gt; #&lt;ASDF/SYSTEM:SYSTEM ""cl-mongo-test""&gt;)
 10: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
 11: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) #&lt;ASDF/LISP-ACTION:COMPILE-OP &gt; #&lt;ASDF/SYSTEM:SYSTEM ""cl-mongo-test""&gt;) [fast-method]
 12: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #&lt;unused argument&gt; #&lt;unused argument&gt; ASDF/LISP-ACTION:COMPILE-OP CL-MONGO-TEST)
 13: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
 14: (ASDF/CACHE:CALL-WITH-ASDF-CACHE #&lt;CLOSURE (LAMBDA NIL :IN ASDF/OPERATE:OPERATE) {10049CF6AB}&gt; :OVERRIDE NIL :KEY NIL)
 15: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/LISP-ACTION:COMPILE-OP CL-MONGO-TEST) [fast-method]
 16: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/LISP-ACTION:COMPILE-OP CL-MONGO-TEST) [fast-method]
 17: (ASDF/OPERATE:COMPILE-SYSTEM CL-MONGO-TEST)
 18: (SB-INT:SIMPLE-EVAL-IN-LEXENV (ASDF/OPERATE:COMPILE-SYSTEM (QUOTE CL-MONGO-TEST)) #&lt;NULL-LEXENV&gt;)
 19: (EVAL (ASDF/OPERATE:COMPILE-SYSTEM (QUOTE CL-MONGO-TEST)))
 --more--
</code></pre>
",https://stackoverflow.com/questions/48727363/common-lisp-and-asdf-system-testing,"['common-lisp', 'asdf']",1434,TRUE,0,2
How do you define functional testing with two popular and seemingly contradictory explanations?,"<p>I've been researching the definition of functional testing and can't come across a concrete explanation and would appreciate some additional info to help reconcile this.</p>

<p>The two main ideas I have come across are:</p>

<ol>
<li>Functional Testing as a Testing Type and is comprised of the following Testing Levels: Unit Testing, Integration Testing, System Testing and Acceptance Testing.</li>
</ol>

<p><a href=""https://i.stack.imgur.com/jRGTy.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/jRGTy.png"" alt=""enter image description here""></a></p>

<ol start=""2"">
<li>Functional Testing as a separate level from Unit Testing and Integration Testing (sometimes a subset of System Testing other times precedes it) that tests the product end-to-end with a Black-box approach. Purpose is to verify all functional specifications defined.</li>
</ol>

<p><a href=""https://i.stack.imgur.com/NIMIM.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/NIMIM.png"" alt=""enter image description here""></a></p>
",https://stackoverflow.com/questions/48614190/how-do-you-define-functional-testing-with-two-popular-and-seemingly-contradictor,"['unit-testing', 'testing', 'functional-testing', 'system-testing']",1375,TRUE,1,2
MySQL select from INT column,"<p>I was doing some system testing and expecting empty results from MySQL(5.7.21) but got surprised to get results.</p>

<p>My transactions table looks like this:</p>

<pre><code>Column        Data type
----------------------------
id           | INT
fullnames    | VARCHAR(40)
---------------------------
</code></pre>

<p>And I have some records </p>

<pre><code>--------------------------------
id           | fullnames
--------------------------------
20           | Mutinda Boniface
21           | Boniface M
22           | Some-other Guy
-------------------------------
</code></pre>

<p>My sample queries:</p>

<pre><code>select * from transactions where id = ""20""; -- gives me 1 record which is fine
select * from transactions where id = 20; -- gives me 1 record - FINE as well
</code></pre>

<p>Now it gets interesting when I try with these:</p>

<pre><code>select * from transactions where id = ""20xxx""; -- gives me 1 record - what is happening here?
</code></pre>

<p>What does MySQL do here??</p>
",https://stackoverflow.com/questions/51280393/mysql-select-from-int-column,"['mysql', 'sql', 'database', 'select', 'type-conversion']",3964,TRUE,6,1
Does anyone know how we can unit test IBM MQ Message Flows in an isolated way using stubs?,"<p>I am new to IBM-MQ and trying to understand how we can perform unit testing on message flows.</p>

<p>I am aware of the tools like CA Lisa to do Service Virtualization and testing at system testing level.</p>

<p>But in my case I am looking for the unit testing framework like Java Junit tests where developer can create tests and required stubs to test the IBM MQ Message flows independently.</p>

<p>Thank You in advance.</p>
",https://stackoverflow.com/questions/53222305/does-anyone-know-how-we-can-unit-test-ibm-mq-message-flows-in-an-isolated-way-us,"['ibm-mq', 'messagebroker', 'ibm-integration-bus']",6155,TRUE,1,3
LDAP error during Rails5 System tests: Rack app error handling request { POST /login },"<p>The LDAP authentication is implemented in Rails using <a href=""https://github.com/plataformatec/devise/wiki/How-To:-Authenticate-via-LDAP"" rel=""nofollow noreferrer"">https://github.com/plataformatec/devise/wiki/How-To:-Authenticate-via-LDAP</a> and it works fine.</p>

<p>An attempt to use LDAP during system tests <a href=""http://guides.rubyonrails.org/testing.html#system-testing"" rel=""nofollow noreferrer"">http://guides.rubyonrails.org/testing.html#system-testing</a> has failed:</p>

<pre><code>Rack app error handling request { POST /login }
#&lt;NoMethodError: undefined method `[]' for nil:NilClass&gt;
.../config/initializers/ldap_authenticatable.rb:92:in `ldap'
.../config/initializers/ldap_authenticatable.rb:60:in `bind_to_ldap'
.../config/initializers/ldap_authenticatable.rb:44:in `authenticate!'
</code></pre>

<p>The error occurs due to <strong>ldap.yml</strong> file, it seems the tests cannot read the configuration from the extern file. The workaround to replace the LDAP parameters</p>

<pre><code>LDAP_CONFIG = YAML.load_file(""#{Rails.root}/config/ldap.yml"")[Rails.env]

def ldap
  ldap = Net::LDAP.new({
    :host =&gt; LDAP_CONFIG['host'],
    :port =&gt; LDAP_CONFIG['port'],
    ...
</code></pre>

<p>with</p>

<pre><code>def ldap
  ldap = Net::LDAP.new({
    :host =&gt; 'ldap.domainname.com',
    :port =&gt; 636,
    ...
</code></pre>

<p>will avoid the error.</p>

<p>Please advise if this is a bug.</p>
",https://stackoverflow.com/questions/51157877/ldap-error-during-rails5-system-tests-rack-app-error-handling-request-post-l,"['ruby-on-rails', 'ldap', 'system-testing']",599,FALSE,0,0
The app does not open on sauce labs cloud,"<p>context:
After I launched test suite on android and iPhone devices the session is closed because of time out. Apparently the app it’s not being even opened inside Sauce Labs cloud.</p>

<p>parameters:
I command used ""ionic cordova build android --prod""
    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0</p>

<p>global packages:</p>

<pre><code>cordova (Cordova CLI) : 8.0.0
</code></pre>

<p>local packages:</p>

<pre><code>@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 6.3.0
Ionic Framework    : ionic-angular 3.9.2
</code></pre>

<p>System:</p>

<pre><code>Android SDK Tools : 26.1.1
ios-deploy        : 1.9.2
Node              : v9.6.1
npm               : 5.6.0
OS                : macOS High Sierra
Xcode             : Xcode 9.3 Build version 9E145
</code></pre>

<p>testing:</p>

<p>./node_modules/.bin/wdio -v4.12.0
 appium v1.8.0</p>

<p>Issue: 
The delay between open the app and the homepage is longer, it takes 2 min.</p>
",https://stackoverflow.com/questions/50102067/the-app-does-not-open-on-sauce-labs-cloud,"['android', 'node.js', 'iphone', 'webdriver-io', 'saucelabs']",199,FALSE,0,1
system test - how to test database without saving data actually,"<p>I currently use   using (TransactionScope scope = new TransactionScope()) for 
 c# testing database insertion so that it doesn't actually save into database for unit testing. But for system testing which I am currently testing on different server to test the status code for different scenarios. Each time I run the test, it is actually saving data into database and next time I ran the test it is failing as it is duplicate record. I tried to use transaction scope , but doesn't seem to work. Please help.</p>
",https://stackoverflow.com/questions/53497682/system-test-how-to-test-database-without-saving-data-actually,"['c#', 'testing', 'system-testing']",244,FALSE,0,0
How to system-test real-time react multiplayer game?,"<p>I am working on a real-time multiplayer board game built using node and socket.io for the backend and react + redux for the frontend. It's the first time I'm doing a project of this sort, i.e. real-time and multiplayer.</p>

<p>I am unsure on how best to go about integration/system testing. How can I actually automate spinning up, say 10 frontends and having them play a game together? Should I use a testing framework for this and if so, which one would be a good choice and why?</p>
",https://stackoverflow.com/questions/50388099/how-to-system-test-real-time-react-multiplayer-game,"['reactjs', 'testing', 'socket.io', 'integration-testing', 'multiplayer']",529,TRUE,1,1
"I am novice to Test Framework tools, Want to develope tests which I can integrate to Jenkins","<p>I want to develop Test frame work, which will run the executable  ( of the projects) and read the input and validate the value entered. </p>

<p>I was reading through gTest and Boost Test, from what I found is used to Module testing ( methods testing) . my purpose here is to System testing in which I have to run the executable and test the output entered. which I have to integrate into Jenkins eventually run as continuous Integration test model.</p>

<p>I would appreciate if anybody through light on this.</p>

<p>Thank you </p>
",https://stackoverflow.com/questions/51586384/i-am-novice-to-test-framework-tools-want-to-develope-tests-which-i-can-integrat,"['jenkins', 'continuous-integration', 'automated-tests', 'googletest', 'boost-test']",42,FALSE,0,1
Why does an `ajax:success&#39; event not fire in Rails system test?,"<p>I have a system test that fails because the proper <code>ajax:success</code> event is not being fired in the test environment. The event is correctly fired when testing manually in the browser.</p>

<p>Here's the link the user (and the test) clicks:</p>

<pre><code>link_to 'Note', note_product_option_path(@product, option), remote: true, data: { note_link: true }
</code></pre>

<p>The JS (CoffeeScript) event, which takes the response and inserts into the <code>body</code> of the document:</p>

<pre><code>NOTE_LINK = '[data-note-link=""true""]'
$ -&gt;
  $('body').on 'ajax:success', NOTE_LINK, (e) -&gt;
    alert 'ajax:success'
    $('.option-note').remove()
    data = e.detail[2].response        
    $div = $('&lt;div&gt;&lt;/div&gt;').html(data)
      .addClass('option-note')
    $('body').append($div)
</code></pre>

<p>Here's the system testing setup:</p>

<pre><code>class ApplicationSystemTestCase &lt; ActionDispatch::SystemTestCase
  include Devise::Test::IntegrationHelpers

  Capybara.register_driver :headless_chrome do |app|
    options = Selenium::WebDriver::Chrome::Options.new
    options.add_argument('headless')
    options.add_argument('window-size=1480x1680')
    Capybara::Selenium::Driver.new(app, :browser =&gt; :chrome, :options =&gt; options)
  end
end
</code></pre>

<p>In my system test:</p>

<pre><code>visit product_path(option.product)
click_link 'Note'
assert_selector '.option-note', wait: 5
</code></pre>

<p>That assertion always fails, even though it always works when I test in the browser. The <code>alert</code> is never caught or fired by Capybara either, but always appears when manually checking. The test log shows that the proper JS is being rendered by the controller. </p>

<p>What am I missing here?</p>
",https://stackoverflow.com/questions/53617288/why-does-an-ajaxsuccess-event-not-fire-in-rails-system-test,['ruby-on-rails'],75,TRUE,1,1
Integration Testing against a service in docker,"<p>I have a microservice which I am testing (Java maven project with JUnit). This has a dependency on another microservice. I am writing an e-2-e system test and want to spin up the external service from a Docker image for a full automated test.</p>

<p>My question is what is the best way to have a maven project spin up a docker image instance which can then be used in an automated test suite?</p>

<p>At the moment I a using maven-exec plugin to call a shell script during the integration-phase which starts the docker container. It may not be the most elegant solution, and I also have no way of knowing when the container is ready.</p>

<p>Any thoughts or help would be appreciated.</p>

<p>Please note: This is for full system testing against real services so I don't want to mock or stub the external service.</p>
",https://stackoverflow.com/questions/49071113/integration-testing-against-a-service-in-docker,"['java', 'maven', 'unit-testing', 'docker', 'docker-compose']",465,TRUE,3,1
HttpWebRequest with large requests in PowerShell,"<p>I'm using PowerShell to post XML to a web service. Everything works fine until the XML exceeds a certain limit (68KB is ok, 107KB fails) when I get an error:</p>

<pre><code>Exception calling ""EndGetResponse"" with ""1"" argument(s): 
""The remote server returned an error: (413) Request Entity Too Large.""
</code></pre>

<p>I've tried GZiping the body but the server does not seem to be able to handle a compressed message and I cannot get access to the server to make any changes to the service being called. The code I am developing is to provide system testing with a way of sending a set of XMLs to the service. The XMLs being used have been captured by the application that uses this service on a day to day basis so I know that the service can handle these XML messages, I am simply unable to configure PowerShell and <code>HttpWebRequest</code> to reproduce this functionality. </p>

<pre><code>[xml]$envelope = Get-Content $envelopePath
[System.Net.WebRequest.HttpWebRequest]$request = [System.Net.WebRequest]::Create($url)

$request.ContentType = ""application/soap+xml;charset=UTF-8;""
$request.Accept = ""text/xml""
$request.Method = ""POST""
$stream = $request.GetRequestStream()
$envelope.Save($stream)
$stream.Close()

$run = $request.BeginGetResponse($null, $null)
$run.AsyncWaitHandle.WaitOne() &gt; $null

# this line returns the error
[System.Net.WebRequest.HttpWebResponse]$response = $request.EndGetResponse($run)
</code></pre>

<p>I've also tried using <code>invoke-WebRequest</code> and <code>invoke-RestRequest</code> but these are both really slow even when using <code>$ProgressPreference = 'SilentlyContinue'</code></p>

<p>Any suggestions of what I can do in PowerShell to get <code>HttpWebRequest</code> to work with large XML?</p>
",https://stackoverflow.com/questions/49149029/httpwebrequest-with-large-requests-in-powershell,['powershell'],664,FALSE,1,0
Spring batch slave step executing infinitely causing partition job waiting for updating status,"<p>I have spring-batch with spring boot application to process 60-70 millions of data. Application was built for using spring batch partitioning. I need to read customer ids from a file  and then read some reference data from redis and oarcle DB and apply some business logic and write to PG DB .
Application working as expected and all our system testing completed. But when we went to PT testing we see few slave steps hang at random place(not consistent with file or line number). Step_execution table version keep increment but no data process. I have tried between 50-1000 partition with 5-25 million data . Only for 1 million a with 36 partition I was able to get completed status for all slaves and partition step. What might be the reason to hang some slave steps. If I re-run the job issue is not consistent like always not the same file(slave) hangs neither same number of slaves hang.</p>
",https://stackoverflow.com/questions/53864627/spring-batch-slave-step-executing-infinitely-causing-partition-job-waiting-for-u,['spring-batch'],291,FALSE,0,0
How can I automatically modify a Pull Request on GitHub?,"<p>I would like to have TravisCI or some other GitHub application automatically modify pull requests based on a script that I provide.  How can I do this?  (Or maybe there is a better solution than what I've come up with.)</p>

<p><strong>Reason:</strong></p>

<p>I'm trying to add integration testing to a GitHub project so that it will automatically run the project and compare the output against known good outputs.  If there is a difference, it should report an error.</p>

<p>However, my tests run on multiple platforms and use different versions of libraries.  Different combinations of platform and library cause different outputs, all valid.  For example, an old version of a library might make a different optimization than the newer one so the outputs are different but both valid.</p>

<p>Because of the difficulty of generating output for every possible combination of libraries, I thought that TravisCI could generate them and add them to the pull request on the PR author's behalf.</p>

<p>Or a totally different solution to system testing would be fine, too.  Thanks!</p>

<p><strong>A more concrete example:</strong></p>

<p>The project that I'm working on is <a href=""https://github.com/pcb2gcode/pcb2gcode"" rel=""nofollow noreferrer"">pcb2gcode</a>.  It converts circuit board layouts (gerbers) to instructions for a CNC machine (g-codes) to mill and drill a board.  Depending on the version of some libraries, like <a href=""https://www.boost.org/"" rel=""nofollow noreferrer"">boost</a> and <a href=""http://gerbv.geda-project.org/"" rel=""nofollow noreferrer"">gerbv</a>, the output might be slightly different but still valid.</p>

<p>I want to have a directory of test gerbers that are automatically run and compared against expected outputs, which are committed into github already.  If the actual output matches the expected output, the test passes.</p>

<p>But the expected output depends on the libraries.  One solution is to have expected outputs for different combinations of libraries.  Then the comparison is done against the correct set of expected outputs.</p>

<p>Generating those expected outputs is difficult because developers would need to run the code with all combinations of libraries.  TravisCI is running the tested and generating outputs anyway so it might as well also write those new expected outputs into the PR.  Then all tests will pass and the expected output can be inspected along with the rest of the PR during code review.</p>

<p>Or some other better method of system testing!</p>
",https://stackoverflow.com/questions/50274504/how-can-i-automatically-modify-a-pull-request-on-github,"['github', 'pull-request', 'system-testing']",31,FALSE,0,0
TFS Test Hub - Requirements-Based Suite not updating count,"<p>Test cases are created in iterations with our sprint cycles. They are then added to a test plan via requirements-based query for our integration and system testing.</p>

<p>At the end of every sprint and leading up to integration and system testing, the requirements-based query is run repeatedly against the same same static test suite to add any newly created test cases to the test plan.</p>

<p>The requirements-based query will see the new items and add them to the test plan, however, anywhere that displays the total count of test cases in the test plan or suites does not update automatically. This includes counts shown in TFS web GUI (""Show count from child tests""), MTM, and any dashboard charts.</p>

<p>The only way to get that count to update is to manually click on each test suite generated from the requirements-based suite.</p>

<hr>

<p>Repro Steps:</p>

<ol>
<li>Create Test Plan - ""Test Plan A""</li>
<li>Create Static Suite in newly created Test Plan - ""Static Suite B"" </li>
<li>Right click on ""Static Suite B"" and select ""New requirements-based suite""</li>
<li>Fill out criteria for requirements-based suite. My query: Top Level: 'Work Item Type - In Group - Feature/Requirement/Bug Categories' and 'Release Number = XX.XX'. Linked Work Items: 'Work Item Type = Test Case'. 'Return all top level items' is selected.</li>
<li>Run query. Results display in grid, including top level items that do not yet have test cases but are assigned to upcoming release.</li>
<li>Select all results in the grid.</li>
<li>Select ""Create Suites"". Suites are created for all items included in the release, including items that do not yet have test cases. Note the total count of test cases in ""Static Suite B"". This count will display in any charts for this test plan and/or suite.</li>
<li>Add a test case for an item that is included in the release but did not have a test case during prior step. Note the top level item for upcoming step.</li>
<li>Navigate back to ""Test Plan A"".</li>
<li>Right click on ""Static Suite B"" and select ""New requirements-based suite""</li>
<li>Query used in Step 4 displays. Do not make any changes to the query.</li>
<li>Run query again. Results display in grid for all top level items, including those that do not yet have test cases but are assigned to upcoming release. Newly created test case should display in the results.</li>
<li>Select all results and select ""Create Suites"". No new suites are created since they were created in Step 6 above. <strong>Do not select existing requirements based suite for the test case that was added in Step 8.</strong></li>
<li>Check the total count of test cases in ""Static Suite B"" and any test plan/suite charts. Observe count has not incremented per new test case.</li>
<li>Navigate to ""Static Suite B"" and select the requirements-based suite where test case was added in Step 7. Observe test case displays in the requirements-based suite as expected.</li>
<li>Check the total count of test cases in ""Static Suite B"" and any test plan/suite charts. Observe count is not incremented per new test case.</li>
</ol>

<p><a href=""https://i.stack.imgur.com/iKbpT.png"" rel=""nofollow noreferrer"">Screenshot of requirements-based query and results (obfuscated)</a></p>

<h2><a href=""https://i.stack.imgur.com/FELAM.png"" rel=""nofollow noreferrer"">Screenshot of counts that do not update (obfuscated)</a></h2>

<p>Has anyone else encountered this and have a fix/work-around?</p>

<p>Using local TFS Version 16.122.27102.1.</p>
",https://stackoverflow.com/questions/50642706/tfs-test-hub-requirements-based-suite-not-updating-count,"['testing', 'tfs', 'microsoft-test-manager']",301,FALSE,1,0
Ruby on Rails Install JQuery,"<p>I create a new project, i am just follow the tutorial step by step to install jquery in my project, but it doesn't work.</p>

<p>I add this two line to my view.<br/>
<li>&lt;% stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %><br/>
<li>&lt;% javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %></li></p>

<hr/>

<p>Project\Gemfile</p>

<pre>
    source 'https://rubygems.org'

    git_source(:github) do |repo_name|
      repo_name = ""#{repo_name}/#{repo_name}"" unless repo_name.include?(""/"")
      ""https://github.com/#{repo_name}.git""
    end


    # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
    gem 'rails', '~> 5.1.4'
    # Use sqlite3 as the database for Active Record
    gem 'sqlite3'
    # Use Puma as the app server
    gem 'puma', '~> 3.7'
    # Use SCSS for stylesheets
    gem 'sass-rails', '~> 5.0'
    # Use Uglifier as compressor for JavaScript assets
    gem 'uglifier', '>= 1.3.0'
    # See https://github.com/rails/execjs#readme for more supported runtimes
    # gem 'therubyracer', platforms: :ruby

    # Use CoffeeScript for .coffee assets and views
    gem 'coffee-rails', '~> 4.2'
    # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
    gem 'turbolinks', '~> 5'
    # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
    gem 'jbuilder', '~> 2.5'
    # Use Redis adapter to run Action Cable in production
    # gem 'redis', '~> 3.0'
    # Use ActiveModel has_secure_password
    # gem 'bcrypt', '~> 3.1.7'

    # Use Capistrano for deployment
    # gem 'capistrano-rails', group: :development

    group :development, :test do
      # Call 'byebug' anywhere in the code to stop execution and get a debugger console
      gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
      # Adds support for Capybara system testing and selenium driver
      gem 'capybara', '~> 2.13'
      gem 'selenium-webdriver'
    end

    group :development do
      # Access an IRB console on exception pages or by using  anywhere in the code.
      gem 'web-console', '>= 3.3.0'
    end

    # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
    gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

    gem 'jquery-rails'
    gem 'mysql2'

</pre>

<p><br/><hr/></p>

<p>Project\app\assets\javascripts\application.js</p>

<pre>
    // This is a manifest file that'll be compiled into application.js, which will include all the files
    // listed below.
    //
    // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
    // vendor/assets/javascripts directory can be referenced here using a relative path.
    //
    // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
    // compiled file. JavaScript code in this file should be added after the last require_* statement.
    //
    // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
    // about supported directives.
    //
    //= require rails-ujs
    //= require turbolinks
    //= require jquery
    //= require jquery_ujs
    //= require_tree .

</pre>
",https://stackoverflow.com/questions/48278940/ruby-on-rails-install-jquery,"['jquery', 'ruby-on-rails', 'ruby']",6632,TRUE,2,2
Dependency Inversion: How to best manage versioning of your Abstractions,"<p><strong>How to version abstractions in .Net when applying Dependency Inversion in a high code-reuse environment</strong></p>

<p>I am interested in shifting toward using Dependency Inversion in .Net, but have come across something that puzzles me.
I don’t believe it is tied to a particular method or provider of DIP, but more a fundamental issue that perhaps others have solved.  The issue I'm solving for is best laid out step-by-step as scenario below.</p>

<p><strong>Assumption / Restriction</strong></p>

<p>A considerable assumption or restriction to put out there up front, is that my development team has stuck with a rule of keeping our deployed assemblies to one and only one Assembly Version, specifically version “1.0.0.0”. 
Thus far, we have not supported having more than this one Assembly Version of any given assembly we’ve developed deployed on a server for the sake of simplicity.  This may be limiting, and there may be many good reasons to move away from this, but never the less, it is currently a rule we work with.  So with this practice in mind, continue below.</p>

<p><strong>Scenario</strong></p>

<ul>
<li>You have an IDoStuff interface contained in an abstraction assembly
Stuff.Abstractions.dll with 2 methods. </li>
<li>You compile component A.dll
with a class explicitly implementing IDoStuff with 2 methods. </li>
<li>You move A.dll to production use, Assembly Version 1.0.0.0, Assembly File
version 1.0.0.0. </li>
<li>You move Interface.dll to prod, Assembly Version
1.0.0.0, Assembly File version 1.0.0.0. </li>
<li>Everything works fine.  Time passes by.</li>
<li>You add another method (“DoMoreStuff” for example) to the IDoStuff interface so that a different Component B can call it.
(Keeping Interface Segregation OO principle in mind, let’s say the DoMoreStuff method makes sense to be in this relatively small IDoStuff interface.)</li>
<li>You now have IDoStuff with 3 methods in Stuff.Abstractions.dll, and you’ve built Component B to use the new 3rd method.</li>
<li>You move Stuff.Abstractions.dll to production use (upgrade it), Assembly Version 1.0.0.0, Assembly File Version 1.0.0.1.
(note that the file version is incremented, but the assembly version and therefore the strong name stays the same)</li>
<li>You move B.dll to production use, Assembly Version 1.0.0.0, Assembly File version 1.0.0.17.</li>
<li>You don’t do a thing to A.dll.  You figure there are no changes needed at this time.</li>
</ul>

<p>Now you call code that attempts to execute A.dll on the same production server where it had been working before. At runtime the Dependency Inversion framework resolves the IDoStuff interface to a class inside A.dll and tries to create it.
Problem is that class in A.dll implemented the now <strong><em>extinct</em></strong> 2-method IDoStuff interface.  As one might expect, you will get an exception like this one:</p>

<p><strong><em>Method ‘DoMoreStuff’ in type ‘the IDoStuff Class inside A.dll’ from assembly ‘strong name of assembly A.dll’ does not have an implementation.</em></strong></p>

<p>I am presented with two ways that I can think of to deal with this scenario when I’d have to add a method to an existing interface:</p>

<p>1)  Update every functionality-providing assembly that uses Stuff.Abstractions.dll to have an implementation of the new ‘DoMoreStuff’ method.
This seems like doing things the hard way, but in a brute-force way would painfully work.</p>

<p>2)  Bend the Assumption / Restriction stated above and start allowing more than one Assembly Version to exist (at least for abstraction definition assemblies).
This would be a bit different, and make for a few more assemblies on our servers, but it should allow for the following end state:</p>

<p>A.dll depends on stuff.abstractions.dll, Assembly Version 1.0.0.0, Assembly File Version 1.0.0.22 (AFV doesn’t matter other than identifying the build)
B.dll depends on stuff.abstractions.dll, Assembly Version 1.0.0.1, Assembly File Version 1.0.0.23 (AFV doesn’t matter other than identifying the build)
Both happily able to execute on the same server.</p>

<p>If both versions of stuff.abstractions.dll are installed on the server, then everything should get along fine.  A.dll should not need to be altered either.  Whenever it needs mods next, you’d have the option to implement a stub and upgrade the interface, or do nothing.  Perhaps it would be better to keep it down to the 2 methods it had access to in the first place if it only ever needed them.
    As a side benefit, we’d know that anything referencing stuff.abstractions.dll, version 1.0.0.0 only has access to the 2 interface methods, whereas users of 1.0.0.1 have access to 3 methods.</p>

<p><strong>Is there a better way or an accepted deployment pattern for versioning abstractions?</strong></p>

<p>Are there better ways to deal with versioning abstractions if you’re trying to implement a Dependency Inversion scheme in .Net?
Where you have one monolithic application, it seems simple since it’s all contained – just update the interface users and implementers.
The particular scenario I’m trying to solve for is a high code-reuse environment where you have lots of components that depend on lots of components.  Dependency Inversion will really help break things up and make Unit Testing feel a lot less like System Testing (due to layers of tight coupling).  </p>
",https://stackoverflow.com/questions/48177424/dependency-inversion-how-to-best-manage-versioning-of-your-abstractions,"['c#', '.net', '.net-assembly', 'abstraction', 'dependency-inversion']",373,TRUE,0,2
