From Fedora Project Wiki

(Created page with '{{admon/caution|Draft|This page is only draft, and will change in time.}} == Syntax Description == <code>method_name (arg1, [arg2 = "Foo"]) -> return_value</code> * <code>meth...')
 
Line 3: Line 3:
 
== Syntax Description ==
 
== Syntax Description ==
  
<code>method_name (arg1, [arg2 = "Foo"]) -> return_value</code>
+
<code>method_name (arg1, [arg2, arg3 = "Foo"]) -> return_value</code>
  
 
* <code>method_name</code> ~ name of the respective method (see [[#Methods]])
 
* <code>method_name</code> ~ name of the respective method (see [[#Methods]])
 
* <code>arg1</code> ~ required argument
 
* <code>arg1</code> ~ required argument
* <code>arg2</code> ~ optional argument, which is set to value "Foo" by default
+
* <code>arg2</code> ~ optional argument, default value is set to None
 +
* <code>arg3</code> ~ optional argument, default value is set to "Foo"
 
* <code>-> return_value</code> ~ method gives back the return_value
 
* <code>-> return_value</code> ~ method gives back the return_value
  
 
== Methods ==
 
== Methods ==
  
=== start_job ===
+
=== start_job ([testplan_url]) -> job_id ===
=== end_job ===
+
=== end_job (job_id) ===
=== start_testrun ===
+
=== start_testrun (test_url, [job_id]) -> testrun_id ===
=== end_testrun ===
+
=== end_testrun (testrun_id, result, [keyval_pairs, summary, highlights]) ===
=== start_phase ===
+
=== start_phase (testrun_id, name) -> phase_id ===
=== end_phase ===
+
=== end_phase (testrun_id, result) ===
=== store_keyval ===
+
=== store_keyval (testrun_id, keyval_pairs) ===
  
 
== Workflows ==
 
== Workflows ==
  
 
=== Simple ===
 
=== Simple ===
 +
 +
<pre>
 +
testrun_id = start_testrun ("http://fedoraproject.org/wiki/QA:Some_test_page")
 +
end_testrun (testrun_id, "PASSED")
 +
</pre>
 +
 
=== Phases - simple ===
 
=== Phases - simple ===
 +
 +
<pre>
 +
testrun_id = start_testrun ("http://fedoraproject.org/wiki/QA:Some_test_page")
 +
  start_phase (testrun_id, "First phase")
 +
  end_phase (testrun_id, "PASSED")
 +
  start_phase (testrun_id, "Second phase")
 +
  end_phase (testrun_id, "PASSED")
 +
end_testrun (testrun_id, "PASSED")
 +
</pre>
 +
 
=== Phases - nested ===
 
=== Phases - nested ===
 +
 +
<pre>
 +
testrun_id = start_testrun ("http://fedoraproject.org/wiki/QA:Some_test_page")
 +
  start_phase (testrun_id, "First phase")
 +
    start_phase (testrun_id, "Second phase")
 +
    end_phase (testrun_id, "PASSED")
 +
  end_phase (testrun_id, "PASSED")
 +
end_testrun (testrun_id, "PASSED")
 +
</pre>
 +
 
=== Using Job ===
 
=== Using Job ===
 +
 +
<pre>
 +
job_id = start_job ()
 +
  testrun_id = start_testrun ("http://fedoraproject.org/wiki/QA:Some_test_page")
 +
    start_phase (testrun_id, "First phase")
 +
    end_phase (testrun_id, "PASSED")
 +
  end_testrun (testrun_id, "PASSED")
 +
 +
  testrun_id = start_testrun ("http://fedoraproject.org/wiki/QA:Some_other_test_page")
 +
    start_phase (testrun_id, "First phase")
 +
    end_phase (testrun_id, "PASSED")
 +
  end_testrun (testrun_id, "PASSED")
 +
</pre>

Revision as of 13:13, 12 April 2010

Stop (medium size).png
Draft
This page is only draft, and will change in time.

Syntax Description

method_name (arg1, [arg2, arg3 = "Foo"]) -> return_value

  • method_name ~ name of the respective method (see #Methods)
  • arg1 ~ required argument
  • arg2 ~ optional argument, default value is set to None
  • arg3 ~ optional argument, default value is set to "Foo"
  • -> return_value ~ method gives back the return_value

Methods

start_job ([testplan_url]) -> job_id

end_job (job_id)

start_testrun (test_url, [job_id]) -> testrun_id

end_testrun (testrun_id, result, [keyval_pairs, summary, highlights])

start_phase (testrun_id, name) -> phase_id

end_phase (testrun_id, result)

store_keyval (testrun_id, keyval_pairs)

Workflows

Simple

testrun_id = start_testrun ("http://fedoraproject.org/wiki/QA:Some_test_page")
end_testrun (testrun_id, "PASSED")

Phases - simple

testrun_id = start_testrun ("http://fedoraproject.org/wiki/QA:Some_test_page")
  start_phase (testrun_id, "First phase")
  end_phase (testrun_id, "PASSED")
  start_phase (testrun_id, "Second phase")
  end_phase (testrun_id, "PASSED")
end_testrun (testrun_id, "PASSED")

Phases - nested

testrun_id = start_testrun ("http://fedoraproject.org/wiki/QA:Some_test_page")
  start_phase (testrun_id, "First phase")
    start_phase (testrun_id, "Second phase")
    end_phase (testrun_id, "PASSED")
  end_phase (testrun_id, "PASSED")
end_testrun (testrun_id, "PASSED")

Using Job

job_id = start_job ()
  testrun_id = start_testrun ("http://fedoraproject.org/wiki/QA:Some_test_page")
    start_phase (testrun_id, "First phase")
    end_phase (testrun_id, "PASSED")
  end_testrun (testrun_id, "PASSED")

  testrun_id = start_testrun ("http://fedoraproject.org/wiki/QA:Some_other_test_page")
    start_phase (testrun_id, "First phase")
    end_phase (testrun_id, "PASSED")
  end_testrun (testrun_id, "PASSED")