<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>12651</bug_id>
          
          <creation_ts>2018-04-04 18:31:01 +0000</creation_ts>
          <short_desc>Simple script to help manual test execution in populating test results into desired format</short_desc>
          <delta_ts>2019-02-22 01:07:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Manual Testing</product>
          <component>manual-testing</component>
          <version>5.99</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.7 M3</target_milestone>
          <dependson>12654</dependson>
          <blocked>12649</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Rebecca Chang">rebecca.swee.fun.chang</reporter>
          <assigned_to name="Mazliana">mazliana.mohamad</assigned_to>
          <cc>ee.peng.yeoh</cc>
    
    <cc>manish.das</cc>
    
    <cc>mazliana.mohamad</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80100</commentid>
    <comment_count>0</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2018-04-04 18:31:01 +0000</bug_when>
    <thetext>In parallel to the effort of storing test results and test logs in git repo, we proposed to create a script to help manual test executor to populate the test results into a desired format.
Current format: json</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80109</commentid>
    <comment_count>1</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2018-04-04 19:26:28 +0000</bug_when>
    <thetext>The script should:

1. step through all test steps
2. prompt tester to provide test results (Passed/ Failed)
3. implement check to check tests that has been executed
    a. if executed (with results), skip
4. populate all test results into separate file with json format</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80181</commentid>
    <comment_count>2</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2018-04-10 01:10:17 +0000</bug_when>
    <thetext>Prototype implementation Plan [Status]:

1. Script able to step through all test steps
   [Done]
2. User able to select test case to run
   [New]
3. User able to select a range of test case to run
   [New]
4. Test result prompt should have status: Passed, Failed, Skipped, Blocked.
   [90%, need to add &apos;BLOCKED&apos; status]
5. Implement a check mechanism to check tests that has been executed
    a. If executed (with results), skip
   [New]
6. Script able to populate all test results into a new json file.
   [80%, debugging to make sure test results are populated in nested dictionary format]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80351</commentid>
    <comment_count>3</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2018-04-20 01:01:38 +0000</bug_when>
    <thetext>Prototype implementation Plan [Status]:

1. Script able to step through all test steps
   [Done]
2. User able to select test case to run
   [New -&gt; Start to looking this functionality]
3. User able to select a range of test case to run
   [New]
4. Test result prompt should have status: Passed, Failed, Skipped, Blocked.
   [Done]
5. Implement a check mechanism to check tests that has been executed
    a. If executed (with results), skip
   [New]
6. Script able to populate all test results into a new json file.
   [Done]

Work archived in GitHub:
https://github.com/rebeccasf/openembedded-core/blob/devel/meta/lib/oeqa/manual/manual-test-helper</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80375</commentid>
    <comment_count>4</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2018-04-23 01:56:44 +0000</bug_when>
    <thetext>Prototype implementation Plan [Status]:

1. Script able to step through all test steps
   [Done]
2. User able to select test case to run
   [WW17.1: Done]
3. User able to select a range of test case to run
   [WW17.1: Start to look into this]
4. Test result prompt should have status: Passed, Failed, Skipped, Blocked.
   [Done]
5. Implement a check mechanism to check tests that has been executed
    a. If executed (with results), skip
   [New]
6. Script able to populate all test results into a new json file.
   [Done]

Work archived in GitHub:
https://github.com/rebeccasf/openembedded-core/blob/devel/scripts/manual-test-helper</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80383</commentid>
    <comment_count>5</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2018-04-23 19:52:48 +0000</bug_when>
    <thetext>Prototype implementation Plan [Status]:

1. [Done] Script able to step through all test steps
2. [WW17.1: Done] User able to select test case to run
3. [WW17.2: Done] User able to select a range of test case to run
4. [Done] Test result prompt should have status: Passed, Failed, Skipped, Blocked.
5. [WW17.2: WIP] Implement a check mechanism to check tests that has been executed
    a. If executed (with results), skip
6. [Done] Script able to populate all test results into a new json file.
    a. If test_results.json exist, script will prompt warning and exit.
    b. Added &quot;-o/--output&quot; option to allow user to save test result into new file name.

Work archived in GitHub:
https://github.com/rebeccasf/openembedded-core/blob/devel/scripts/manual-test-helper</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81598</commentid>
    <comment_count>6</comment_count>
    <who name="Manish Das">manish.das</who>
    <bug_when>2018-09-21 00:34:38 +0000</bug_when>
    <thetext>@Rebecca the mentioned github link is not working. It gives page not found error (404). I need more information to understand and analyse it this bug.

In bugzilla, information is not available about the test cases/test plan and json file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81600</commentid>
    <comment_count>7</comment_count>
    <who name="Mazliana">mazliana.mohamad</who>
    <bug_when>2018-09-21 06:12:19 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; @Rebecca the mentioned github link is not working. It gives page not found
&gt; error (404). I need more information to understand and analyse it this bug.
&gt; 
&gt; In bugzilla, information is not available about the test cases/test plan and
&gt; json file.

The link is outdated and not longer being used. Provide you with latest link for your references.

Work archived in poky-contrib:
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/tree/scripts/manual-test-helper?h=mazliana/qa-revamp-manual

Please find below information for running the manual-test-helper script.

User manual:
1. To run as normal process
$ ./manual-test-helper -F &lt;test suite json file location&gt; 
&lt;test suite json file location&gt;: Currently tested with ../meta/lib/oeqa/manual/bitbake/bitbake_testcases.json
 
2. To print out all test cases in JSON file
$ ./manual-test-helper -F &lt;test suite json file location&gt; -S
$ ./manual-test-helper -F &lt;test suite json file location&gt; --scan
 
3. To run specific test case (-tc or --testcase)
$ ./manual-test-helper -F &lt;test suite json file location&gt; -tc &lt;test case name&gt;
&lt;test case name&gt;: Use the output from “--scan”
 
4. To run a range of test cases, say: we want to run test case #3 to #6 (-tr or --testrange)
$ ./manual-test-helper -F &lt;test suite json file location&gt; -tr 3 6
 
5. To route test result to another file, use “-o/--output” option
$ ./manual-test-helper -F &lt;test suite json file location&gt; -o “&lt;file name&gt;”
 
6. You are able to rerun specific test case by providing the test result file (-r or --rerun)
$ ./manual-test-helper -F &lt;test suite json file location&gt; -o “&lt;file name&gt;” -r &lt;testcasename&gt;
 
7. If you have a partial complete test result, you can resume test (-R or --resume)
$ ./manual-test-helper -F &lt;test suite json file location&gt; -o “&lt;file name&gt;” –R

8. If you want run the test plan, you need to include the test_plan.conf 
 $ ./manual-test-helper -F &lt;test suite json file location&gt; -tp  &lt;test plan conf file location&gt;

9. If you want resume from execute the test plan.
$ ./manual-test-helper -F &lt;test suite json file location&gt; -tp  &lt;test plan conf file location&gt; -R</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81763</commentid>
    <comment_count>8</comment_count>
    <who name="Mazliana">mazliana.mohamad</who>
    <bug_when>2018-10-05 02:07:01 +0000</bug_when>
    <thetext>Prototype implementation Plan [Status]:

1. [Done] The script able to provide user to store failure log.
2. [Done] The script able to delete the log file when update the test cases from failed to passed/skipped/blocked.
3. [Done] Standardize test result format among automated and manual tests.
4. [Done] Completed enable function for test plan- The user need add which test cases in test_plan.conf to exclude from execution.

Enhancement:
1. [WW40.5 WIP] The script required refactoring given the changes to OEQA where OEQA will be able to write testresult to json.

Work archived in GitHub:
https://github.com/mazliana/openembedded-core/blob/manual-test-helper/scripts/manual-test-helper</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82504</commentid>
    <comment_count>9</comment_count>
    <who name="Mazliana">mazliana.mohamad</who>
    <bug_when>2018-12-14 09:41:07 +0000</bug_when>
    <thetext>Recently, roadmap was changes where we plan to upstream manual-test-helper with bare-minimum function. Manual-test-helper is one of an alternative test case management tool of Testopia by naming as &quot;manualexecution&quot;. 

Bare-minimum function refer to function where the user can only execute all of the test cases in baseline command, which consists of user guideline steps and the expected results. The last step will ask user to provide their input to execute result. The input options are passed/failed/skipped status. The result given will be written in testresults.json including log error from the user input and configuration if there is any. The output test result for json file is created by using OEQA library.
 
The configuration part is manually key-in by the user. The system allow user to specify how many configuration they want to add and they need to define the required configuration name and value pair. In QA perspective, &quot;configuration&quot; means the test environments  and parameters used during QA setup before testing can be carry out. Example of configurations: image used for boot up, host machine distro used, poky configurations, etc. 
 
The purpose of adding the configuration is to standardize the output test result format between automation and manual execution. 
 
The functionality of manual-test-helper (bare-minimum function):
1. Execute all test cases
2. Create log file if result failed
3. The users input result only accept passed/failed/skipped. When users put other than passed/failed, it will detect as skipped.
	Ex: When users press enter or number, the input detect as skipped.
4. Reuse OEQA library to create test_result.json.
5. Users are able to know the total number of test cases that need to be executed.
6. The configuration part is manually key-in by the user. 

To use these scripts, first source oe environment, then run the entry point script to look for help.
        $ test-case-mgmt

To execute manual test cases, execute the below
        $ test-case-mgmt manualexecution &lt;manualjsonfile&gt;

By default testresults.json store in &lt;build_dir&gt;/tmp/log/manual


[1] scripts/test-case-mgmt: add &quot;manualexecution&quot; as a tool : https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/tree/scripts/test-case-mgmt?h=mazliana/test-case-mgmt-store-report-revised
[2] script/lib/testcasemgmt/manualexecution.py : manual helper script with bare-minimum function : https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/tree/scripts/lib/testcasemgmt/manualexecution.py?h=mazliana/test-case-mgmt-store-report-revised</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82896</commentid>
    <comment_count>10</comment_count>
    <who name="yeoh ee peng">ee.peng.yeoh</who>
    <bug_when>2019-01-30 03:14:38 +0000</bug_when>
    <thetext>Submitted revised patch to manage manual execution. 
http://lists.openembedded.org/pipermail/openembedded-core/2019-January/278488.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>