B2G/QA/WebAPI Test Plan/WebSMS: Difference between revisions

< B2G‎ | QA‎ | WebAPI Test Plan
(Created page with "=B2G Screen Orientation API Test Plan= == Summary == {| class="fullwidth-table" |- | style="width:28%" | '''Lead''' | [mailto:nobody@example.com John Doe] (irc: johndoe) |- ...")
 
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
=B2G Screen Orientation API Test Plan=
=B2G WebSMS API Test Plan=


== Summary ==
== Summary ==
Line 5: Line 5:
  |-
  |-
  | style="width:28%" | '''Lead'''
  | style="width:28%" | '''Lead'''
  | [mailto:nobody@example.com John Doe] (irc: johndoe)
  | [mailto:gmealer@mozilla.com Geo Mealer] (irc: geo)
  |-
  |-
  | '''Contributors'''
  | '''Contributors'''
Line 11: Line 11:
  |-
  |-
  | '''API Description'''
  | '''API Description'''
  | Insert a description here
  | Send/receive SMS messages as well as manage messages stored on device.
  |-
  |-
  | ''' API Developer'''
  | ''' API Developer'''
  | [mailto:nobody@example.com John Doe]
  | [mailto:mlamouri@mozilla.com Mounir Lamouri]
  |-
  |-
  | '''API Project Page'''
  | '''API Project Page'''
  | [[WebAPI/Some Project|Some Project]]
  | [[WebAPI/WebSMS|WebSMS]]
  |-
  |-
  | '''API Tracking Bugs'''
  | '''API Tracking Bugs'''
  | Put bug|links to the tracking bugs here
  | {{Bug|674725}}
  |-
  |-
  | '''API Status'''
  | '''API Status'''
  | Put current API delivery status here
  | Mostly done for B2G.
  |-
  |-
  |}
  |}
Line 39: Line 39:


=== Related Prefs ===
=== Related Prefs ===
If user prefs can turn the API on or off or otherwise modify its operation, describe them here.
* <tt>dom.sms.enabled</tt>


=== [http://mxr.mozilla.org/mozilla-central/source/nsISomeInterface.idl#1 nsISomeInterface] ===
* <tt>dom.sms.whitelist</tt>
 
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMNavigatorSms.idl nsIDOMNavigatorSms] : nsISupports ===
==== Attributes ====
* <tt>readonly nsIDOMMozSmsManager mozSms</tt>
 
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsCursor.idl nsIDOMSmsCursor] : nsISupports ===
==== Attributes ====
* <tt>readonly nsIDOMMozSmsMessage message</tt>
 
==== Methods ====
* <tt>void continue()</tt>
 
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsEvent.idl nsIDOMSmsEvent] : nsIDOMEvent ===
==== Attributes ====
* <tt>readonly nsIDOMMozSmsMessage message</tt>
 
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsFilter.idl nsIDOMSmsFilter] : nsISupports ===
==== Attributes ====
==== Attributes ====
* ''read-only'' <tt>DOMString someAttribute</tt> (values can be foo, bar, baz, bam)
* <tt>jsval startDate</tt><br>Date, can return null
 
* <tt>jsval endDate</tt><br>Date, can return null
 
* <tt>jsval numbers</tt><br>Array of DOMString, can return null
 
* <tt>DOMString delivery</tt><br>"sent", "received", or null
 
* <tt>jsval read</tt><br>Boolean, can be undefined


=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsManager.idl nsIDOMSmsManager] : nsIDOMEventTarget ===
==== Methods ====
==== Methods ====
* <tt>boolean someMethod(in DOMString param)</tt>
* <tt>unsigned short getNumberOfMessagesForText(in DOMString text)</tt>
* <tt>void anotherMethod()</tt>
 
* <tt>jsval send(in jsval number, in DOMString message)</tt><br>First param can be DOMString (one number) or Array of DOMString (multiple numbers).<br>Returns either SmsRequest or array of SmsRequest accordingly.
 
* <tt>nsIDOMMozSmsRequest getMessage(in long id)</tt>
 
* <tt>nsIDOMMozSmsRequest delete(in jsval param)</tt><br>Param can be either message id or SmsMessage
 
* <tt>nsIDOMMozSmsRequest getMessages(in nsIDOMMozSmsFilter filter, in boolean reverse)</tt>
 
* <tt>nsIDOMMozSmsRequest markMessageRead(in long id, in boolean aValue)</tt>


==== Events ====
==== Events ====
* <tt>onsomevent</tt>
* <tt>onreceived</tt>
 
* <tt>onsent</tt>
 
* <tt>ondelivered</tt>
 
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsMessage.idl nsIDOMSmsMessage] : nsISupports ===
==== Attributes ====
* <tt>readonly long id</tt>
 
* <tt>readonly DOMString delivery</tt><br>"sent" or "received"
 
* <tt>readonly DOMString sender</tt>
 
* <tt>readonly DOMString receiver</tt>
 
* <tt>readonly DOMString body></tt>
 
* <tt>readonly jsval timestamp</tt><br>Date
 
* <tt>readonly boolean read</tt>
 
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsRequest.idl nsIDOMSmsRequest] : nsIDOMDOMRequest ===
&nbsp;
 
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsISmsDatabaseService.idl nsISmsDatabaseService] : nsISupports ===
==== Methods ====
* <tt>long saveReceivedMessage(in DOMString aSender, in DOMString aBody, in unsigned long long aDate)</tt><br>Takes some information required to save the message and returns its id.
 
* <tt>long saveSentMessage(in DOMString aReceiver, in DOMString aBody, in unsigned long long aDate)</tt><br>Takes some information required to save the message and returns its id.
 
* <tt>void getMessage(in long messageId, in long requestId, [optional] in unsigned long long processId)</tt>
 
* <tt>void createMessageList(in nsIDOMMozSmsFilter filter, in boolean reverse, in long requestId, [optional] in unsigned long long processId)</tt>
 
* <tt>void getNextMessageInList(in long listId, in long requestId, [optional] in unsigned long long processId)</tt>
 
* <tt>void clearMessageList(in long listId);</tt>
 
* <tt>void markMessageRead(in long messageId, in boolean value, in long requestId, [optional] in unsigned long long processId);</tt>
 
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsISmsRequestManager.idl nsISmsRequestManager] : nsISupports ===
==== Constants ====
* <tt>unsigned short SUCCESS_NO_ERROR</tt>
 
* <tt>unsigned short NO_SIGNAL_ERROR</tt>
 
* <tt>unsigned short NOT_FOUND_ERROR</tt>
 
* <tt>unsigned short UNKNOWN_ERROR</tt>
 
* <tt>unsigned short INTERNAL_ERROR</tt>
 
==== Methods ====
* <tt>long createRequest(in nsIDOMMozSmsManager aManager, out nsIDOMMozSmsRequest aRequest)</tt><br>Create a new request object, return the request ID
 
* <tt>long addRequest(in nsIDOMMozSmsRequest aRequest)</tt><br>Track an already existing request object, return the request ID
 
* <tt>void notifySmsSent(in long aRequestId, in nsIDOMMozSmsMessage aMessage)</tt>
 
* <tt>void notifySmsSendFailed(in long aRequestId, in long aError)</tt>
 
* <tt>void notifyGotSms(in long aRequestId, in nsIDOMMozSmsMessage aMessage)</tt>
 
* <tt>void notifyGetSmsFailed(in long aRequestId, in long aError)</tt>
 
* <tt>void notifySmsDeleted(in long aRequestId, in bool aDeleted)</tt>
 
* <tt>void notifySmsDeleteFailed(in long aRequestId, in long aError</tt>
 
* <tt>void notifyNoMessageInList(in long aRequestId)</tt>
 
* <tt>void notifyCreateMessageList(in long aRequestId, in long aListId, in nsIDOMMozSmsMessage aMessage)</tt>
 
* <tt>void notifyGotNextMessage(in long aRequestId, in nsIDOMMozSmsMessage aMessage)</tt>
 
* <tt>void notifyReadMessageListFailed(in long aRequestId, in long aError)</tt>
 
* <tt>void notifyMarkedMessageRead(in long aRequestId, in bool aRead)</tt>
 
* <tt>void notifyMarkMessageReadFailed(in long aRequestId, in long aError)</tt>
 
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsISmsService.idl nsISmsService] : nsISupports ===
 
==== Methods ====
* <tt>boolean hasSupport()</tt>
 
* <tt>unsigned short getNumberOfMessagesForText(in DOMString text)</tt>
 
* <tt>void send(in DOMString number, in DOMString message, in long requestId, [optional] in unsigned long long processId)</tt>
 
* <tt>nsIDOMMozSmsMessage createSmsMessage(in long id, in DOMString delivery, in DOMString sender, in DOMString receiver, in DOMString body, in jsval timestamp, in bool read)</tt>


== Tests ==
== Tests ==
Line 70: Line 196:
* Test 1
* Test 1
* Test 2
* Test 2


=== Test App Design ===
=== Test App Design ===

Latest revision as of 01:51, 27 June 2012

B2G WebSMS API Test Plan

Summary

Lead Geo Mealer (irc: geo)
Contributors TBD
API Description Send/receive SMS messages as well as manage messages stored on device.
API Developer Mounir Lamouri
API Project Page WebSMS
API Tracking Bugs bug 674725
API Status Mostly done for B2G.

Scope

A short section should be added here that describes the testing scope of this plan: both what is and is not included, broadly.

Strategy

Explain here how to test the API in question (emulator, device-agnostic CI tests, on-device applications, or a combination).

In the likely case of a combination, discuss how tests will be split between options.

API

Describe the API here. Give a short summary, what the API does, and any considerations or preconditions for using it.

Related Prefs

  • dom.sms.enabled
  • dom.sms.whitelist

nsIDOMNavigatorSms : nsISupports

Attributes

  • readonly nsIDOMMozSmsManager mozSms

nsIDOMSmsCursor : nsISupports

Attributes

  • readonly nsIDOMMozSmsMessage message

Methods

  • void continue()

nsIDOMSmsEvent : nsIDOMEvent

Attributes

  • readonly nsIDOMMozSmsMessage message

nsIDOMSmsFilter : nsISupports

Attributes

  • jsval startDate
    Date, can return null
  • jsval endDate
    Date, can return null
  • jsval numbers
    Array of DOMString, can return null
  • DOMString delivery
    "sent", "received", or null
  • jsval read
    Boolean, can be undefined

nsIDOMSmsManager : nsIDOMEventTarget

Methods

  • unsigned short getNumberOfMessagesForText(in DOMString text)
  • jsval send(in jsval number, in DOMString message)
    First param can be DOMString (one number) or Array of DOMString (multiple numbers).
    Returns either SmsRequest or array of SmsRequest accordingly.
  • nsIDOMMozSmsRequest getMessage(in long id)
  • nsIDOMMozSmsRequest delete(in jsval param)
    Param can be either message id or SmsMessage
  • nsIDOMMozSmsRequest getMessages(in nsIDOMMozSmsFilter filter, in boolean reverse)
  • nsIDOMMozSmsRequest markMessageRead(in long id, in boolean aValue)

Events

  • onreceived
  • onsent
  • ondelivered

nsIDOMSmsMessage : nsISupports

Attributes

  • readonly long id
  • readonly DOMString delivery
    "sent" or "received"
  • readonly DOMString sender
  • readonly DOMString receiver
  • readonly DOMString body>
  • readonly jsval timestamp
    Date
  • readonly boolean read

nsIDOMSmsRequest : nsIDOMDOMRequest

 

nsISmsDatabaseService : nsISupports

Methods

  • long saveReceivedMessage(in DOMString aSender, in DOMString aBody, in unsigned long long aDate)
    Takes some information required to save the message and returns its id.
  • long saveSentMessage(in DOMString aReceiver, in DOMString aBody, in unsigned long long aDate)
    Takes some information required to save the message and returns its id.
  • void getMessage(in long messageId, in long requestId, [optional] in unsigned long long processId)
  • void createMessageList(in nsIDOMMozSmsFilter filter, in boolean reverse, in long requestId, [optional] in unsigned long long processId)
  • void getNextMessageInList(in long listId, in long requestId, [optional] in unsigned long long processId)
  • void clearMessageList(in long listId);
  • void markMessageRead(in long messageId, in boolean value, in long requestId, [optional] in unsigned long long processId);

nsISmsRequestManager : nsISupports

Constants

  • unsigned short SUCCESS_NO_ERROR
  • unsigned short NO_SIGNAL_ERROR
  • unsigned short NOT_FOUND_ERROR
  • unsigned short UNKNOWN_ERROR
  • unsigned short INTERNAL_ERROR

Methods

  • long createRequest(in nsIDOMMozSmsManager aManager, out nsIDOMMozSmsRequest aRequest)
    Create a new request object, return the request ID
  • long addRequest(in nsIDOMMozSmsRequest aRequest)
    Track an already existing request object, return the request ID
  • void notifySmsSent(in long aRequestId, in nsIDOMMozSmsMessage aMessage)
  • void notifySmsSendFailed(in long aRequestId, in long aError)
  • void notifyGotSms(in long aRequestId, in nsIDOMMozSmsMessage aMessage)
  • void notifyGetSmsFailed(in long aRequestId, in long aError)
  • void notifySmsDeleted(in long aRequestId, in bool aDeleted)
  • void notifySmsDeleteFailed(in long aRequestId, in long aError
  • void notifyNoMessageInList(in long aRequestId)
  • void notifyCreateMessageList(in long aRequestId, in long aListId, in nsIDOMMozSmsMessage aMessage)
  • void notifyGotNextMessage(in long aRequestId, in nsIDOMMozSmsMessage aMessage)
  • void notifyReadMessageListFailed(in long aRequestId, in long aError)
  • void notifyMarkedMessageRead(in long aRequestId, in bool aRead)
  • void notifyMarkMessageReadFailed(in long aRequestId, in long aError)

nsISmsService : nsISupports

Methods

  • boolean hasSupport()
  • unsigned short getNumberOfMessagesForText(in DOMString text)
  • void send(in DOMString number, in DOMString message, in long requestId, [optional] in unsigned long long processId)
  • nsIDOMMozSmsMessage createSmsMessage(in long id, in DOMString delivery, in DOMString sender, in DOMString receiver, in DOMString body, in jsval timestamp, in bool read)

Tests

Marionette/JS

Test Type 1

  • Test 1
  • Test 2

Test Type 2

  • Test 1
  • Test 2

mochitest-plain

Test Type 1

  • Test 1
  • Test 2

Test Type 2

  • Test 1
  • Test 2

Test App Design

Describe application functionality here


This page is based on the WebAPI Test Plan Template