title,body,link,tags,view_count,is_answered,score,answer_count
test coordination procedures in the Acceptance testing of Diag,"<p>what tool will be used for test coordination procedures in the Acceptance testing of Diag. Can any body explain a bit about Test Coordination Procedures in Acceptance Testing of Diag.<br />
Thanks in Advance</p>
<p>can any body help me creating the skeleton of the Acceptance Testing</p>
",https://stackoverflow.com/questions/75358864/test-coordination-procedures-in-the-acceptance-testing-of-diag,"['testing', 'procedure', 'acceptance-testing', 'autosar', 'coordination']",25,False,0,0
ThinkingSphinx real time indexes &amp; Rspec Acceptance Testing w Chrome headless,"<p>Continued: <a href=""https://stackoverflow.com/q/75985141/6241373"">ThinkingSphinx &amp; callback doesnt update index after creating record</a><br />
I'm testing the search with rspec and chrome headless.<br />
With SQL indexes i used this feature spec + helper: <a href=""https://pastebin.com/9m7WbvN7"" rel=""nofollow noreferrer"">https://pastebin.com/9m7WbvN7</a><br />
Replaced SQL indexes with real time:</p>
<pre class=""lang-rb prettyprint-override""><code>ThinkingSphinx::Index.define :review, with: :real_time do
  indexes title, sortable: true
  indexes body
  indexes author.username, as: :author, sortable: true

  has author_id, :type =&gt; :integer
  has created_at, :type =&gt; :timestamp
  has updated_at, :type =&gt; :timestamp
end
</code></pre>
<p>In dev mode, everything works, but the tests began to fall.<br />
I tried to edit sphinx_helper using the manual: <a href=""https://freelancing-gods.com/thinking-sphinx/v5/testing.html"" rel=""nofollow noreferrer"">https://freelancing-gods.com/thinking-sphinx/v5/testing.html</a><br />
But i failed and get an error:</p>
<pre><code>An error occurred in a `before(:suite)` hook.
Failure/Error: ThinkingSphinx::Test.start_with_autostop
Riddle::CommandFailedError:
  Sphinx command failed to execute

# /gems/riddle-2.4.3/lib/riddle/execute_command.rb:25:in `call'
# /gems/riddle-2.4.3/lib/riddle/execute_command.rb:7:in `call'
# /gems/riddle-2.4.3/lib/riddle/controller.rb:33:in `index'
# /gems/thinking-sphinx-5.5.1/lib/thinking_sphinx/test.rb:13:in `start'
# /gems/thinking-sphinx-5.5.1/lib/thinking_sphinx/test.rb:19:in `start_with_autostop'
# ./spec/sphinx_helper.rb:14:in `block (2 levels) in &lt;top (required)&gt;'
</code></pre>
<p><strong>Update</strong>: Adding a port didn't change anything.<br />
config/thinking_sphinx.yml:</p>
<pre class=""lang-yaml prettyprint-override""><code>test:
  mysql41: 9307
</code></pre>
<p>If you run it manually via rake, the configuration file is created and sphinx runs successfully:</p>
<pre class=""lang-bash prettyprint-override""><code>bundle exec rake ts:configure RAILS_ENV=test
Generating configuration to /home/vagrant/data/app/config/test.sphinx.conf

bundle exec rake ts:start RAILS_ENV=test
using config file '/home/vagrant/data/app/config/test.sphinx.conf'...
listening on 127.0.0.1:9307
precaching index 'review_core'
precaching index 'user_core'
precached 2 indexes in 0.002 sec
Started searchd successfully (pid: 6532).
</code></pre>
<p>The contents of test.sphinx.conf are the same as development.sphinx.conf, only the paths change.<br />
test.sphinx.conf, btw, is created during an attempt to run a test <a href=""https://pastebin.com/GavMg5BB"" rel=""nofollow noreferrer"">https://pastebin.com/GavMg5BB</a><br />
If add in <code>/gems/thinking-sphinx-5.5.1/lib/thinking_sphinx/test.rb</code>:</p>
<pre><code>def self.start(options = {})
  pp  config.controller
</code></pre>
<p>output: <a href=""https://pastebin.com/ta34Ys6k"" rel=""nofollow noreferrer"">https://pastebin.com/ta34Ys6k</a><br />
When run the test, nothing is written in log/test.searchd.log because sphinx does not start.</p>
<p><strong>UP2</strong> This is what riddle is trying to run::</p>
<pre><code># /gems/riddle-2.4.3/lib/riddle/execute_command.rb:7
&quot;indexer --config \&quot;/home/vagrant/data/app/config/test.sphinx.conf\&quot; --all&quot;
</code></pre>
<p>If i try to do it manually, i get:
<code>ERROR: nothing to do.</code></p>
",https://stackoverflow.com/questions/75990130/thinkingsphinx-real-time-indexes-rspec-acceptance-testing-w-chrome-headless,"['ruby-on-rails', 'rspec', 'full-text-search', 'thinking-sphinx', 'acceptance-testing']",71,True,0,1
test coordination procedures in the Acceptance testing of Diag,"<p>what tool will be used for test coordination procedures in the Acceptance testing of Diag. Can any body explain a bit about Test Coordination Procedures in Acceptance Testing of Diag.<br />
Thanks in Advance</p>
<p>can any body help me creating the skeleton of the Acceptance Testing</p>
",https://stackoverflow.com/questions/75358864/test-coordination-procedures-in-the-acceptance-testing-of-diag,"['testing', 'procedure', 'acceptance-testing', 'autosar', 'coordination']",25,False,0,0
How can I (and should I?) acceptance test a simple Flask app without importing unnecessary libraries?,"<p>I'm relatively new to Python and entirely new to Flask. I'm trying to create a Flask app that at least initially consists of little more than a couple of forms, some number crunching based on the values you submit and then a page displaying the outcome. It will probably never have a database.</p>
<p>The in-progress version based on the Flask 'getting started' guide plus importing the logic, looks like this:</p>
<pre><code>from flask import Flask, request, render_template
import pdb

import calculators.simple_calc.simple_calc as sc
from calculators.website.forms.simple_calc import SimpleCalcForm

app = Flask(__name__)
app.config['SECRET_KEY'] = 'seekrit'

@app.route('/', methods=['GET', 'POST'])
def simple_calc_page():
  form = SimpleCalcForm()
  calc = None
  if form.validate_on_submit():
    calc = sc.SimpleCalc(request.form)
  return render_template('simple_calc_page.html', form=form, calc=calc)
</code></pre>
<p>And this works fine. But when I look up guides to acceptance testing in Flask, eg <a href=""https://testdriven.io/blog/flask-pytest/"" rel=""nofollow noreferrer"">this</a> and <a href=""https://pytest-flask.readthedocs.io/en/latest/"" rel=""nofollow noreferrer"">this</a>, I end up down a rabbithole: we start with a create_app() function, which the docs haven't mentioned until now. Looking at the <a href=""https://flask.palletsprojects.com/en/2.2.x/patterns/appfactories/"" rel=""nofollow noreferrer"">guide for that</a>, I'm still unsure where to put the function (GPT tells me in the <code>__init__.py</code> file, but that instruction seems to have been removed from all the docs in which GPT found it), or where to call it from; and it's now telling me to import a further library, Blueprint, just to create this file.</p>
<p>This all feels very complicated for what I'm trying to do. Should I nonetheless do it anyway? If so, where <em>should</em> I put the create_app() function, and where should I call it from? Or is it better to stick with a simpler approach? And if so, how do I actually do acceptance testing?</p>
",https://stackoverflow.com/questions/76007636/how-can-i-and-should-i-acceptance-test-a-simple-flask-app-without-importing-u,"['python', 'flask', 'pytest']",25,False,0,1
GitFlow - How can I achieve continuous deployment for some parts of a pull request/deployment even when others don&#39;t past testing?,"<p>We have 3 environments:</p>
<ul>
<li>Staging - where all developer pull requests get merged for quality assurance testing</li>
<li>Release - After quality assurance testing, staging pull requests are merged into the release branch and are available for acceptance testing</li>
<li>Main - Once accepted, the release pull requests are merged into the Main branch for production release.</li>
</ul>
<p>In the above case, when deployment occurs in a bunch, it works fine, but when we want to do continuous deployment, it gets blocked.</p>
<p>Example: Feature 1, 2, 3 are ready for QAing on staging and staging is merged into release. Now acceptance testers accepted only feature 3 and reworked feature 1 &amp; 2. In this case until feature 1 &amp; 2 gets fixed, the entire deployment is blocked.</p>
<p>A solution to this is: Cherry-pick the commit for feature 3 and push it to the main.</p>
<p>This is very complex when there are multiple commits and there might be merged commits with staging as well. Also, it is very time consuming.</p>
<p>Is there any way to automate or speed up this process to achieve continuous deployment for the pull requests that get accepted?</p>
",https://stackoverflow.com/questions/75505191/gitflow-how-can-i-achieve-continuous-deployment-for-some-parts-of-a-pull-reque,"['git', 'continuous-deployment', 'git-flow']",166,False,1,2
Codeception 5 test parameters recommendation sought,"<p>I'm writing a Gherkin-based acceptance testing PoC. I have a feature file, step object, and a page object. In my sequence I will need to log-in the test user before conducting the rest of the series. Our SUT is a legacy PHP application that didn't use any framework.</p>
<p>I would like to store the testuser's credentials in a params.yml or other external config file but have been unsuccessful in making this work and unable to find a complete example.</p>
<p>My login object is a simple Cest class for now. I didn't think it needed its own feature description, the rest of the tests will be Gherkin based where needed. My config files are currently the default configs generated by Codeception 5's bootstrap command with a gherkin section added for the one feature file I've written so far. Eventually I will run this under WebDriver to enable sessions...for now I'm just trying to establish a reusable environment we can build on for a team of developers.</p>
<p>The Codeception docs seem to gloss over some of these concepts or recommendations for users new to their framework.</p>
<p>I sincerely appreciate any ideas or concerns you may have.</p>
<pre class=""lang-php prettyprint-override""><code>&lt;?php

namespace Tests\Acceptance;

use Codeception\Attribute\Group;
use Tests\Support\AcceptanceTester;
use Tests\Support\Page\Acceptance\LoginPage;

class LoginCest
{

    #[Group('login')]
    public function successfulLogin(AcceptanceTester $I, LoginPage $loginPage)
    {
        $loginPage-&gt;login( &lt;testUserHere&gt;, &lt;goodPasshere&gt; ); // &lt;-this is what I want to provide
        $I-&gt;dontSeeElement('.alert-error');
        $I-&gt;amOnPage(&quot;/command.php&quot;);
    }
    public function unsuccessfulLogin(AcceptanceTester $I, LoginPage $loginPage)
    {
        $loginPage-&gt;login(getenv( &lt;testUserHere&gt; , 'baddpass');
        $I-&gt;seeElement('.alert-error');
        $I-&gt;amOnPage(&quot;/&quot;);
    }
}
</code></pre>
",https://stackoverflow.com/questions/75495518/codeception-5-test-parameters-recommendation-sought,"['codeception', 'acceptance-testing', 'php-8.1']",42,False,0,1
How to decide which scenarios to cover in &quot;Acceptance tests&quot; and which in &quot;Unit tests&quot;,"<p>Lately, I'm learning a lot about <strong>acceptance testing, BDD and TDD</strong> (ATDD too). But my main problem is that <strong>i find it difficult to know which test cases i should include in the acceptance tests and which test cases i should include in the unit tests</strong>. For instance, i'll give a clear use case example:</p>
<p><em>Imagine you are creating a backend app (http api) that keeps track of what videogames you are playing, played and plan to play. Imagine one of the requirements is &quot;the user must be able to add videogames with a status of 'playing', 'played' and 'plan to play' into his library&quot;.</em></p>
<p>In this case, what should you be covering in acceptance tests and what should you be covering in unit tests?</p>
<p>I'm seeking for a <strong>clear criteria to know how to decide which scenarios(tests) would be best to cover in acceptance tests (doing BDD) and what tests would be better to cover in unit testing (doing TDD)</strong> (maybe there isn't and just experience over time will tell me).</p>
<p><strong>What i know so far</strong>, is that acceptance tests asserts that the code does what users want, and we want to achieve a behavioral especification that captures the intention of the user (the WHAT). In other words, acceptance tests should focus on testing the system's behavior and features from the end user's perspective. Meanwhile, unit tests are meant to focus on testing technical details and may not directly relate to the functionality and requirements that end users are interested in. And many unit tests may not be a requirement from the perspective of the end user, they just test how a certain piece of code should behave (the HOW). But this criteria seems quite ambiguous/vague to me and it is difficult for me to see clearly what should acceptance tests cover vs unit tests.</p>
<p><strong>Another question</strong>, Should the acceptance tests cover all the corner cases? If so, won't there be a lot of repeated tests between the acceptance tests and the unit tests?</p>
<p>Examples from last question: A user trying to add a game that already exists in his library. You test this in acceptance test but also in unit tests? Another example could be testing if the username is 4 characters minimum in the user creation use case. Or testing if password is not null, and has minimum 8 characters. Do you test all of these in separate tests and test it 2 times in both acceptance and unit test just to make sure the acceptance test is telling you that the feature is failing and the unit test shows you where it is failing?</p>
<p>Thanks for taking the time to read this.</p>
",https://stackoverflow.com/questions/75779768/how-to-decide-which-scenarios-to-cover-in-acceptance-tests-and-which-in-unit,"['unit-testing', 'tdd', 'bdd', 'acceptance-testing', 'atdd']",70,False,0,2
