Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-48251

'In order to create a quiz that awards marks the way I want' feature is failing

XMLWordPrintable

    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • MOODLE_28_STABLE
    • wip-mdl-48251
    • Hide

      Replace behat.yml features list with following to narrow down behat steps:

      features:
              - /home/rajesht/moodles/im/moodle/blocks/activity_modules/tests/behat
              - /home/rajesht/moodles/im/moodle/mod/quiz/tests/behat
      

      Also, remove all features from mod/quiz/tests/behat except:

      1. behat_mod_quiz.php
      2. editing_set_marks_with_attempts.feature

      Tests

      1. Without patch you can see the failure
      2. With patch you will not see failure
      Show
      Replace behat.yml features list with following to narrow down behat steps: features: - /home/rajesht/moodles/im/moodle/blocks/activity_modules/tests/behat - /home/rajesht/moodles/im/moodle/mod/quiz/tests/behat Also, remove all features from mod/quiz/tests/behat except: behat_mod_quiz.php editing_set_marks_with_attempts.feature Tests Without patch you can see the failure With patch you will not see failure

      'In order to create a quiz that awards marks the way I want' feature is failing on nightly. I tried reproduce it on my local machine, but it's passing for me.
      Created this issue to investigate further.

      01. exception 'dml_missing_record_exception' with message 'Can not find data record in database table course.' in /var/lib/jenkins/moodle/behat_whole_suite_m/lib/dml/moodle_database.php:1451
          Stack trace:
          #0 /var/lib/jenkins/moodle/behat_whole_suite_m/lib/dml/moodle_database.php(1427): moodle_database->get_record_select('course', 'id = ?', Array, '*', 2)
          #1 /var/lib/jenkins/moodle/behat_whole_suite_m/lib/datalib.php(588): moodle_database->get_record('course', Array, '*', 2)
          #2 /var/lib/jenkins/moodle/behat_whole_suite_m/lib/modinfolib.php(443): get_course('385000', false)
          #3 /var/lib/jenkins/moodle/behat_whole_suite_m/lib/modinfolib.php(412): course_modinfo->__construct(Object(stdClass), '2')
          #4 /var/lib/jenkins/moodle/behat_whole_suite_m/lib/modinfolib.php(2098): course_modinfo::instance('385000', 0)
          #5 /var/lib/jenkins/moodle/behat_whole_suite_m/filter/activitynames/filter.php(64): get_fast_modinfo('385000')
          #6 /var/lib/jenkins/moodle/behat_whole_suite_m/lib/filterlib.php(167): filter_activitynames->filter('Test quiz 12', Array)
          #7 /var/lib/jenkins/moodle/behat_whole_suite_m/lib/filterlib.php(205): filter_manager->apply_filter_chain('Test quiz 12', Array, Array)
          #8 /var/lib/jenkins/moodle/behat_whole_suite_m/lib/weblib.php(1255): filter_manager->filter_text('Test quiz 12', Object(context_module), Array)
          #9 /var/lib/jenkins/moodle/behat_whole_suite_m/lib/weblib.php(1484): format_text('Test quiz 12', '0', Array, NULL)
          #10 /var/lib/jenkins/moodle/behat_whole_suite_m/mod/quiz/lib.php(1197): format_module_intro('quiz', Object(stdClass), 161000)
          #11 /var/lib/jenkins/moodle/behat_whole_suite_m/mod/quiz/lib.php(1140): quiz_update_events(Object(stdClass))
          #12 /var/lib/jenkins/moodle/behat_whole_suite_m/mod/quiz/lib.php(92): quiz_after_add_or_update(Object(stdClass))
          #13 /var/lib/jenkins/moodle/behat_whole_suite_m/course/modlib.php(121): quiz_add_instance(Object(stdClass), NULL)
          #14 /var/lib/jenkins/moodle/behat_whole_suite_m/lib/testing/generator/module_generator.php(262): add_moduleinfo(Object(stdClass), Object(stdClass), NULL)
          #15 /var/lib/jenkins/moodle/behat_whole_suite_m/mod/quiz/tests/generator/lib.php(97): testing_module_generator->create_instance(Object(stdClass), Array)
          #16 /var/lib/jenkins/moodle/behat_whole_suite_m/lib/testing/generator/data_generator.php(466): mod_quiz_generator->create_instance(Array, Array)
          #17 /var/lib/jenkins/moodle/behat_whole_suite_m/lib/tests/behat/behat_data_generators.php(314): testing_data_generator->create_module('quiz', Array, Array)
          #18 /var/lib/jenkins/moodle/behat_whole_suite_m/lib/tests/behat/behat_data_generators.php(226): behat_data_generators->process_activity(Array)
          #19 [internal function]: behat_data_generators->the_following_exist('activities', Object(Behat\Gherkin\Node\TableNode))
          #20 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/behat/behat/src/Behat/Behat/Definition/Annotation/Definition.php(155): call_user_func_array(Array, Array)
          #21 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/moodlehq/behat-extension/src/Moodle/BehatExtension/Tester/MoodleStepTester.php(228): Behat\Behat\Definition\Annotation\Definition->run(Object(behat_init_context))
          #22 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/behat/behat/src/Behat/Behat/Tester/StepTester.php(126): Moodle\BehatExtension\Tester\MoodleStepTester->executeStepDefinition(Object(Behat\Gherkin\Node\StepNode), Object(Behat\Behat\Definition\Annotation\Given))
          #23 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/moodlehq/behat-extension/src/Moodle/BehatExtension/Tester/MoodleStepTester.php(172): Behat\Behat\Tester\StepTester->executeStep(Object(Behat\Gherkin\Node\StepNode))
          #24 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/moodlehq/behat-extension/src/Moodle/BehatExtension/Tester/MoodleStepTester.php(148): Moodle\BehatExtension\Tester\MoodleStepTester->executeStep(Object(Behat\Gherkin\Node\StepNode))
          #25 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/behat/gherkin/src/Behat/Gherkin/Node/AbstractNode.php(42): Moodle\BehatExtension\Tester\MoodleStepTester->visit(Object(Behat\Gherkin\Node\StepNode))
          #26 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/behat/behat/src/Behat/Behat/Tester/BackgroundTester.php(97): Behat\Gherkin\Node\AbstractNode->accept(Object(Moodle\BehatExtension\Tester\MoodleStepTester))
          #27 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/behat/gherkin/src/Behat/Gherkin/Node/AbstractNode.php(42): Behat\Behat\Tester\BackgroundTester->visit(Object(Behat\Gherkin\Node\BackgroundNode))
          #28 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/behat/behat/src/Behat/Behat/Tester/ScenarioTester.php(120): Behat\Gherkin\Node\AbstractNode->accept(Object(Behat\Behat\Tester\BackgroundTester))
          #29 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/behat/behat/src/Behat/Behat/Tester/ScenarioTester.php(78): Behat\Behat\Tester\ScenarioTester->visitBackground(Object(Behat\Gherkin\Node\BackgroundNode), Object(Behat\Gherkin\Node\ScenarioNode), Object(behat_init_context))
          #30 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/behat/gherkin/src/Behat/Gherkin/Node/AbstractNode.php(42): Behat\Behat\Tester\ScenarioTester->visit(Object(Behat\Gherkin\Node\ScenarioNode))
          #31 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/behat/behat/src/Behat/Behat/Tester/FeatureTester.php(88): Behat\Gherkin\Node\AbstractNode->accept(Object(Moodle\BehatExtension\Tester\MoodleScenarioTester))
          #32 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/behat/gherkin/src/Behat/Gherkin/Node/AbstractNode.php(42): Behat\Behat\Tester\FeatureTester->visit(Object(Behat\Gherkin\Node\FeatureNode))
          #33 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/behat/behat/src/Behat/Behat/Console/Command/BehatCommand.php(150): Behat\Gherkin\Node\AbstractNode->accept(Object(Behat\Behat\Tester\FeatureTester))
          #34 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/behat/behat/src/Behat/Behat/Console/Command/BehatCommand.php(128): Behat\Behat\Console\Command\BehatCommand->runFeatures(Object(Moodle\BehatExtension\Gherkin\MoodleGherkin))
          #35 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php(241): Behat\Behat\Console\Command\BehatCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
          #36 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(895): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
          #37 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(191): Symfony\Component\Console\Application->doRunCommand(Object(Behat\Behat\Console\Command\BehatCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
          #38 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/behat/behat/src/Behat/Behat/Console/BehatApplication.php(68): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
          #39 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(121): Behat\Behat\Console\BehatApplication->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
          #40 /var/lib/jenkins/moodle/behat_whole_suite_m/vendor/behat/behat/bin/behat(32): Symfony\Component\Console\Application->run()
          #41 {main}
          In step `And the following "activities" exist:'.                         # behat_data_generators::the_following_exist()
          From scenario background.                                                # /var/lib/jenkins/moodle/behat_whole_suite_m/mod/quiz/tests/behat/editing_set_marks_with_attempts.feature:6
          Of feature `In order to create a quiz that awards marks the way I want'. # /var/lib/jenkins/moodle/behat_whole_suite_m/mod/quiz/tests/behat/editing_set_marks_with_attempts.feature
      

            rajeshtaneja Rajesh Taneja
            rajeshtaneja Rajesh Taneja
            Tim Hunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.