Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8377710B54 for ; Fri, 21 Jun 2013 12:35:50 +0000 (UTC) Received: (qmail 92270 invoked by uid 500); 21 Jun 2013 12:35:49 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 92255 invoked by uid 500); 21 Jun 2013 12:35:49 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 92240 invoked by uid 99); 21 Jun 2013 12:35:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jun 2013 12:35:48 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of iclelland@google.com designates 209.85.214.179 as permitted sender) Received: from [209.85.214.179] (HELO mail-ob0-f179.google.com) (209.85.214.179) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jun 2013 12:35:43 +0000 Received: by mail-ob0-f179.google.com with SMTP id xk17so8426764obc.38 for ; Fri, 21 Jun 2013 05:35:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=g1FhMEkRFOss8FOzno1bmEW6Jt3bJtKB5fvDnCRGmU8=; b=O9zAWnGE2I9zs5faka5SaMFJIZkbxmdtUABmRKxsIoGIyM/QE0ODhLOTQX/56u1kdf Nw4huWSTyy423gZHSKK9d+DYsePENMSzhibdLcUCWDc+lKTdEc81zTX93J9nxluWYS+o qbqnM2GbUB/xjhlwdRKlV4I5ApJ1oAIQ2BbDzr/wuhg55ChKErRdaHCFnwxnlBTrgt/K d4y4IdJ1cjcX+JdJPZiWHK3X6AegO+9LamLZyoAQj2PttZvwFGPwu3jkoenu/7RjElXi T6uL3EYyfwuVGZ2c18iO6b/LlFnpsQ7NQRy0xIg8TFq4546SAy9q9YoerMjETeurkxfw V5bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=g1FhMEkRFOss8FOzno1bmEW6Jt3bJtKB5fvDnCRGmU8=; b=YV7Z1KqPABWIbzaYVZhlWjdKgCgrh4Q8sFzgEOSxKkDPykFeoHs3I3QV6gaMAuIsvC dFi8Or0kZ2g2mZWfy2iLGb7BAMnVSTYjOnolnjRrbovHLKhCU6kz/fuqNl5wkJe0+XG7 lyOoIMAvWQsMjCIUynreLilN3DTh2jqB+uHdFOKIEWrPhWSZ85FfXeh+EQkjM8uLd2ZZ sS5/V+xGupC+O/+NY+hklSjAFemiLL9ho4UgcgObxzM7DMQRlPw6swXEKCZQ+LrnA0kB 8xLpjP0CHpf3fpeKp7+FpJpveNTPWPUc02jCM8SQSwc2fpA4GxYsT5CO8X6NEKyMQtjw JSyg== X-Received: by 10.60.85.34 with SMTP id e2mr6706663oez.0.1371818123160; Fri, 21 Jun 2013 05:35:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.106.196 with HTTP; Fri, 21 Jun 2013 05:35:03 -0700 (PDT) In-Reply-To: <-3012607342433856500@unknownmsgid> References: <2D04CA88799BFF41A56DAE6575F62B7E240C8FC6@XMB111CNC.rim.net> <-3012607342433856500@unknownmsgid> From: Ian Clelland Date: Fri, 21 Jun 2013 08:35:03 -0400 Message-ID: Subject: Re: Opinions Needed: Platform specific features and mobilespec tests To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=089e0111c484ed8a2704dfa94bae X-Gm-Message-State: ALoCoQm3Fu5l+PqRGgg5C8wQW0i6+85nEYz9bk0Qi5rvQyE1wc1ZK6YHZRLLdTaPTNSxPtDVpdX2+k6m8b/h7Dj17Fm3HHhTrAABqa0zsvBNW298tD7OiOzL3U7fpvws+9AK/gzORDZY43UoT83tvzex7PzNsrL9U0X+iQs4Ntw6HRJ71dCtCH+daGtXSvo2GC37Yfs2Ghy6 X-Virus-Checked: Checked by ClamAV on apache.org --089e0111c484ed8a2704dfa94bae Content-Type: text/plain; charset=UTF-8 For tests like this, I'd like to see something in Jasmine that is akin to the "Expected Failure" result in JUinit / python unittest. It means that we still run all of the tests, but a failure on a device that doesn't support the feature doesn't cause the whole test suite to turn red. On the other hand, if a test which is expected to fail actually succeeds, that is reported as "unexpected success" in the test output. We can then go and look at what has changed -- either the test is broken, or the issue was actually resolved. I don't think it's available as an idiom in Jasmine, but it's just JavaScript; it shouldn't be too hard to implement. Ian > On 13-06-20 9:06 AM, "Andrew Grieve" wrote: > > > > Definitely torn on this one. On one hand, if there are features > > implemented > > on some platforms that should be implemented on others than having them > > fail is a constant reminder that your platform needs to implement the > > missing functionality. OTOH, things like camera clean-up are meant to be > > platform specific, so it's nothing but an annoyance if that fails on > other > > platforms. > > > > So, I think my take on it is: > > > > 1. Have them shared and failing if the API should eventually be > > implemented > > on all platforms > > 2. Wrap tests in if (platform.name == 'ios') {} if they are meant to > only > > work on one platform. > > > > > > > > > > > > > > On Thu, Jun 20, 2013 at 8:44 AM, Lisa Seacat DeLuca > > wrote: > > > >> One issue I ran with respects to the mobile spec is some tests are only > >> applicable to certain device types. We have a couple options when it > >> comes to those types of tests: > >> > >> 1. Not include them in the automated tests > >> 2. Include them knowing that they *might* cause failures with certain > >> device types (see example) > >> 3. Add javascript logic to check for device type before performing the > >> tests > >> 4. OR we could create platform specific automated tests that should be > >> ran > >> in addition to the base automated test per device. ex. automatedAndroid, > >> automatedIOS, etc. > >> > >> An example is: > >> https://issues.apache.org/jira/browse/CB-3484 > >> camera.cleanup is only supported on iOS. > >> > >> I added a test case to verify that the function existed. But it doesn't > >> actually run camera.cleanup so there are no failure on other platforms. > >> So > >> really there shouldn't be any harm in keeping the test. > >> > >> > >> What are everyone's opinions on a good approach to handle this type of > >> situation? > >> > >> Lisa Seacat DeLuca > > > --------------------------------------------------------------------- > This transmission (including any attachments) may contain confidential > information, privileged material (including material protected by the > solicitor-client or other applicable privileges), or constitute > non-public information. Any use of this information by anyone other > than the intended recipient is prohibited. If you have received this > transmission in error, please immediately reply to the sender and > delete this information from your system. Use, dissemination, > distribution, or reproduction of this transmission by unintended > recipients is not authorized and may be unlawful. > --089e0111c484ed8a2704dfa94bae--