Git Product home page Git Product logo

cloudprint_logocert's Introduction

Google Cloud Print Logo Certification Tool

The Logo Certification tool is a group of tests designed to aid in running
Logo Certification tests that printers must pass in order to obtain Logo
Certification. The tool is made up of a number of python files, and utilizes
the python UnitTest module to actually execute the tests.

List of modules and their purpose:

--> testcert.py - the entry point and driver of the tests. All of the actual
tests are located in this file.
--> _common.py - some shared functions within the package.
--> _config.py - configuration information. This needs to be updated for each
specific device under test. This file needs to be edited by the user executing
the test
--> _ticket.py - Provides the Cloud Job Ticket (CJT) object and methods to
specify various print options for both cloud printing and local printing
--> _cpslib.py - Methods to access GCP API's
--> _device.py - Methods to support populating the device attributes.
--> _gdocs.py - Methods to interact with Google Docs and Google Drive.
--> _jsonparser.py - Methods to parse and handle JSON formatted docs and strings.
--> _log.py - Provides a logger to ensure proper logging of all activities.
--> _zconf.py - Provides support for monitoring mdns advertisements.
--> _oauth2.py - Provides support to get oauth2 tokens.
--> _privet.py - Provides privet structures.
--> _sheets.py - Uses _gdocs.py to create and populate a Google spreadsheet.
--> _transport.py - Provides HTTP support for accessing web services.

The tests are divided into suites the focus on specific areas. The areas tested
are:

1. Privet Protocol Integration
2. Pre-registration Tests
3. Cloud Print Registration
4. Post-registration Tests
5. Local Discovery Tests
6. Local Print Tests
7. Printing Tests
8. Printer Capabilities
9. Printer State Tests
10. Job State Tests
11. Cloud Print Unregistration
12. Post-unregistration Tests

DEPENDENCIES:
(Instructions below are for Unix devices. For Windows,
 use easy_install.py from PythonDir/Scripts)

Requests module is required for HTTP comms. To install, use the command:
sudo pip install --upgrade requests

OAuth2Client and Google API client are required, To install, use the commands:

sudo pip install --upgrade oauth2client
sudo pip install --upgrade google-api-python-client

The Python Zeroconf package is used to execute some of the mDNS tests. Install
ZeroConf from the package located here:

Using PIP:
sudo pip install --upgrade zeroconf

Or download from one of the following:
https://pypi.python.org/pypi/zeroconf
https://github.com/jstasiak/python-zeroconf

The tool will also store test results into a Google Spreadsheet. If you want
to use this functionality, you will need to install gdata. Install gdata from:

https://github.com/google/gdata-python-client

gdata depends on tlslite, if you get an error stack trace such as:
File "/usr/local/lib/python2.7/dist-packages/gdata/oauth/rsa.py", line 10
  from tlslite.utils import keyfactory
ImportError: No module named tlslite.utils

then install tlslite by running:
sudo pip install tlslite

gdata also depends on ElementTree; however, most systems will have ElementTree
installed already. To test if it's installed, from a Python shell try:

from xml.etree import ElementTree

Before executing the Logo Certification Tool, a number of preparatory steps are
required to get your test environment set up correctly.

1. Test Account - Use a test account that uses Gmail, in order to properly
authenticate against Google properties and also use OAuth2 credentials. Once
you have obtained a test account, obtain OAuth2 credentials from the Google
Developers Console. You'll also need a 2nd test account, without the OAuth2
credentials.

- Log in with your test account at https://accounts.google.com/
- Access the Google Developers Console: https://console.developers.google.com
- Create a project
- Access the project you just created
- In the left three-bar/hamburger menu, open "API Manager"
- Select the Credentials link on the left
- Create an OAuth2.0 Client ID of type "Other", native has been renamed to
  "Other" in many places.
- Two tokens are needed: under Client ID for native applications, copy the
-- Client ID
-- Client Secret

2. Edit _config.py

The following sections should be edited:

-- AUTOMODE --
* You should probably set this to False, as this will cause each
  print test to wait for user input to determine if it passed or failed. If
  AUTOMODE = True, then all jobs will be printed out and regardless of how they
  look, the test will pass.

-- CAPS --
* This should reflect the actual capabilities of the printer. Set the
  following values to True or False, depending on if the printer supports them
  or not.

  Please refer to _config.py for instructions to populating these fields.

-- SLEEP --
* This script tries its best to avoid using sleep but in the case that it is
  used, you can tweak the sleep times based on the categories. The printer
  specific ones are REGISTRATION, and PRINTER_STATE, defaults are 5 and 10 secs
  respectively.

-- TEST['RUN'] --
* You may specify which tests to run/ignore via editing this.
  Add a '#' prefix in front of a test name to exclude from test
.

-- LOGFILES --
* Change this from /tmp/logocert if you want the log files to be stored in a
  different location.

-- PRINTER --
* Add the correct values for CERTID (Certification ID), FIRMWARE, IP address,
  MANUFACTURER, MODEL, PORT (integer, not string), SERIAL, and STATUS.

-- TEST --
* If you don't want the test results to be written to a Google Spreadsheet,
  then change SPREADSHEET to False.

* If you don't want to share the Google Sheets results with Google, set
  SHARE_SHEET_WITH_GOOGLE to False. However, it is highly recommended that you
  enable sharing to facilitate debugging and progress tracking. Setting
  SHARE_SHEET_WITH_GOOGLE to True enables read/write access for
  [email protected].

* If you are on a Windows machine and running the tool out of an ANSI color
  supporting console and want to enable color output, set FORCE_COLOR_OUTPUT
  to True.

-- USER --
* Add the client id, client secret of the test account from step 1. Also add the
  email address of this user.

-- USER2 --
* Add the email address of the 2nd test account.

Save the _config.py and then all of the preparatory work is completed. Now simply
execute testcert.py (NOTE: The user account should have no GCP printers registered
under it before this script runs):

./testcert.py

Note that the first time you run this script, you may need to enter your
credentials and sign in manually and click to authorize permissions. During the
tests, sometimes you'll be prompted to accept printer registration on the
device, and other times to ignore or cancel registration requests. Pay attention
to the testcert.py output as it will ask you to turn the printer on and off at
various times during the test process. All prompt actions are highlighted and
create a beep sound when they appear.

If you need to remove some of the test suites, edit _config.py (TEST['RUN']),
and add a '#' in front of suite names you don't want to run. Pay attention
to the whether the printer is registered or not before isolating suites however.
See the list below for the required initial condition of each suite.

The complete list of all testsuites and the order they should run is
as follows:

-------------------------Printer is UNREGISTERED before running the suites below
- SystemUnderTest
- Privet
- PreRegistration
- Registration
-------------------------Printer is REGISTERED before running the suites below
- PostRegistration
- LocalDiscovery
- Printer
- PrinterState
- JobState
- CloudPrinting
- LocalPrinting
- RunAfter24Hours
- Unregister
-------------------------Printer is UNREGISTERED before running the suites below
- PostUnregistration

The order that the test cases run is determined alphanumerically, but the suites
will run in the order they are placed in.

LocalPrinting has a one-time dependency on CloudPrinting. When the
LocalPrinting suite is run for the first time for a printer, it will make calls
to the GCP submit interface in order to download the converted pwg-raster images
that will be used in subsequent LocalPrinting tests. If Cloud Printing does not
work for your printer, you would have to manually generate pwg-raster formats of
testpage.png and rosemary.pdf then store them under the images directory as
testpage.pwg and rosemary.pwg.

Once the test has run, results will be placed in a log file. Log files are
created with a date-time stamp in the logname. All of the test results will be
annotated with passed, skipped, blocked, or failed, and possibly some other
debug information. And if TEST['SPREADSHEET'] = True, then the results will be
placed in a Google spreadsheet for easy reading of the test results.

For each test that are blocked or failed, a cmdline is provided in the Google
spreadsheet for the individual test case to be run again only by itself.
They follow this format:
    python -m unittest [moduleName].[testSuiteName].[testCaseName]
Example:
    python -m unittest testcert.Privet.testDeviceRegistrationInvalidClaimToken

Known Issues

1. Mac OSX

If running on Mac OSX, you may come across this error - 'AttributeError:
'Module_six_moves_urllib_parse' object has no attribute 'urlparse'' This occurs
due to OSX comes with an out-of-date six.py. To fix this, simply run the
following command each time you open a new terminal or add to bash profile:

     export PYTHONPATH=/Library/Python/2.7/site-packages

This will make python to check site-packages before the OSX system dirs

2. Windows

If running on Windows, you may not be able to detect any printers on start
up. This is due to an existing zeroconf issue:
python-zeroconf/python-zeroconf#84

There are two workarounds for this:

  a) Comment out the line "if addr.get('netmask') != HOST_ONLY_NETWORK_MASK" in
  zeroconf.py (Note: This requires editing a Python dependency)

  OR

  b) Downgrading zeroconf.py's dependency, netifaces, to 0.10.4

cloudprint_logocert's People

Contributors

apophis981 avatar bryangl avatar kdlucas avatar keshavgbpecdelhi avatar kool814 avatar lookarliu avatar lrbom avatar surenderkodam avatar vamshikk avatar yasuhirofuruta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudprint_logocert's Issues

GCP Logo Certification GitHub Tool: Local Discovery Suite Issues

The latest version of the automation tool (since pull #15) has a bug, in the 'LocalDiscovery' suite.
The mdns_browser.listener.discovered[k] does not store a value of False/True.
We think that the 'LocalDiscovery' suite should refer to the
mdns_browser.listener.discovered[k]['found'].

If fixed it, this tesut will passed:

Passed
Local Discovery successfully disabled.
Local Discovery successfully enabled.

testLocalPrintUpdateMgtPage() Failure

There are two ways to access the list of "Print Job".
Please see the screenshot below to clearly understand the problem:

This is the first way. Let's call this 'Print Jobs 1'
print jobs without filter

The second way is by clicking the 'show print jobs' shown below. Let's call this 'Print Jobs 2'
print jobs inside printers

During printing locally, the print job gets submitted using the printer's robot account. So the print job will not show under 'Print Jobs 1'. But it will show under 'Print Jobs 2'.

If I'm not mistaken all print job showing in "Print Jobs 1" are jobs that belongs to me, that is, ownerId: [email protected].

All print jobs showing in "Print Jobs 2" are job that belongs to all user including the robot account under that specific printer.

As what you've said (@kdlucas) from our previous email thread, when printing locally, the printer's robot account is used as an ownerId
(e.g 3c1c01d118ceef296e07026446e97a05@cloudprint.googleusercontent.com) so it is expected that it will not show in 'Print Jobs 1'

The problem is, the new gcp automation test script (testLocalPrintUpdateMgtPage) is expecting the job to show under "Print Jobs 1".

I think the test script must be modified to expect from "Print Jobs 2" when printing locally not from "Print Jobs 1"

-Marc

testLocalPrintingToggle() Failure

The failure is at line 2108 of testcert.py
The function was trying to find the change button from the chrome print dialog but this dialog is not visible/open, thus the test failed.

I believe the print dialog box must be visible first before calling 'SelectPrinterFromPrintDialog()'.

@kdlucas and I already have an email thread about this issue.

Thanks
-Marc

About testOpenPaperTray() and testNoMediaInTray()

testOpenPaperTray() and testNoMediaInTray() expect that an error icon (red) is displayed on the management page when a tray is open or empty.
However the management page displays a warning icon (yellow) for some printer which can accept jobs in that state.

I think both the error icon and the warning icon should be acceptable in these test cases.

Add feature to skip tests.

Add feature that allows tests to be skipped, as some tests should not be run if printers do not contain specific features.

About testDeviceAcceptRegistration

Kelly

When we execute this test with our printer, according the message on the console as below.

Verify printer must accept registration requests on printer panel. ... Validate if printer required user to accept registration request
If printer does not have accept/cancel on printer panel,
Fail this test.
Did the test produce the expected result?
Enter "y" or "n"

We have to fail this test manually(entered ‘n’), because our printer didn't have accept/cancel on printer panel. To fix this issue, we read the testcert.py source and found that it seems like this test is only printing out some messages. We think there should be registration execution like "chrome.RegisterPrinter(self.printer)".in the source of this test .
Could you please tell us the purpose of this test and let us know if there is something wrong with our understanding.

Auth token expiration

Auth tokens have a shelf time of 1 hour before expiration. Currently, the token is refreshed at the beginning of every test suite (aside form CloudPrinting, since it's a long testsuite, token refresh is handled before each test case) .

Since users may very well be occupied with other tasks between test cases, this error could occur every now and then. We should be able to refresh auth tokens when we detect that they are expired instead of failing.

testPrintJpgLarge() Failure

This test case fails because 'GoogleArt.jpg' cannot be printed from the Cloud Print management page.
In this time the server says "Could not convert to PDF.".

I think 'GoogleArt.jpg' is too large to print from the Cloud Print management page.

Does anyone know the maximum size which is acceptable from the Cloud Print management page?

Workaround for local printing layout issue of Chrome

Many printers do not send the "page_orientation" field in CDD because of the instructions of Google.
However, the Chrome browser does not display the layout setting if there is no "page_orientation" field in CDD.

I suggest skipping the test case "testLocalPrintLayout" for temporary workaround, if "LAYOUT_ISSUE" option is False in CAPS.

Media sensor option in CAPS

Currently media sensor test(e.g. "testNoMediaInTray") is enabled if the tray sensor option ("TRAY_SENSOR") is set.
However, some printers have either a media sensor or a tray sensor.
(e.g. a low-end inkjet printer that has one rear feeder supports a media sensor only.)

I think a new option for the media sensor test is needed in CAPS.

Automatically detect Privet Port

Currently the privet tcp port is hard coded in the _config.py file. Add code that will automatically detect the privet port using mdns.

logocert_api branch no module named uritemplate

I attempted to set up and run the logocert_api branch today on OSX, running Python 2.7.10, and when testcert.py executes, I get:

File "./testcert.py", line 49, in
import _sheets
File "/Users/kdlucas/src/logocert_api/cloudprint_logocert/_sheets.py", line 22, in
import _gdocs
File "/Users/kdlucas/src/logocert_api/cloudprint_logocert/_gdocs.py", line 31, in
from googleapiclient import discovery
File "/Library/Python/2.7/site-packages/googleapiclient/discovery.py", line 53, in
import uritemplate
ImportError: No module named uritemplate

The googleapiclient is installed. I try to debug a bit and find out what else needs to be installed.

I fixed the issue by installing uritemplate with:

sudo pip install uritemplate.py

I then got another error:
./testcert.py
Adding SystemUnderTest to list of suites to run
Adding Privet to list of suites to run
/Library/Python/2.7/site-packages/oauth2client/_helpers.py:255: UserWarning: Cannot access credentials.txt: No such file or directory
warnings.warn(_MISSING_FILE_MESSAGE.format(filename))
No handlers could be found for logger "oauth2client.client"
ERROR

ERROR: setUpModule (main)

Traceback (most recent call last):
File "./testcert.py", line 149, in setUpModule
getTokens()
File "./testcert.py", line 245, in getTokens
GetNewTokens()
File "./testcert.py", line 282, in GetNewTokens
creds = run_flow(flow, _storage, flags=flags,http=http)
File "/Library/Python/2.7/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Library/Python/2.7/site-packages/oauth2client/tools.py", line 218, in run_flow
authorize_url = flow.step1_get_authorize_url()
File "/Library/Python/2.7/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Library/Python/2.7/site-packages/oauth2client/client.py", line 1934, in step1_get_authorize_url
return _helpers.update_query_params(self.auth_uri, query_params)
File "/Library/Python/2.7/site-packages/oauth2client/_helpers.py", line 222, in update_query_params
parts = urllib.parse.urlparse(uri)
AttributeError: 'Module_six_moves_urllib_parse' object has no attribute 'urlparse'

I haven't yet figured out how to solve this.

Error in testLocalPrintGoogleDoc() and testLocalPrintGoogleSheet()

testLocalPrintGoogleDoc() and testLocalPrintGoogleSheet() call PrintGoogleItem().
PrintGoogleItem() clicks an 'ade' class element.

The error occurs in these test cases because there is no 'ade' class element in Google Docs page and Google Sheets page.
(On the other hand, it is on Gmail page)

PrintGoogleItem() should check that the 'ade' class element exists on the page before clicking.

    print_labels = self.cd.FindClass('ade')
    self.cd.MouseOver(print_labels)

Job state checking is too early

The test cases "testMalformattedFile" and "testJobStateEmptyInputTray" are checking the job state after 10 seconds from submitting the job.

The test case "testMalformattedFile" expects the job state is "Printed", but the job state is still "In progress" on some printer because the printer is printing the job at that time.
The test case "testJobStateEmptyInputTray" expects the job state is "Error", but the job state is still "In progress" on some printer because the printer is trying to feed a paper at that time.
10 seconds are too short.

I think these test cases should wait until the job state becomes a state other than "In progress" before checking that.

Add dependency version checking to logocert_api branch

The ReadMe provides all the dependencies that one would need to install before running the tool. However, in cases where the dependencies fail to install properly, it would be useful for the script to detect out-of-date modules and notify the users of it.

print syntax in Python 3.5.1

Hello,

When attempting to run the logo certification tool on a Windows machine, I am running into a problem where the Print statement requires parentheses. After doing some research, it appears this is a change from Python 2 to Python 3, though when exactly the change took place is unclear to me. I have attached a screen shot of an example where I am running the Python shell and attempt to use the print statement with and without ().

printsyntax

testPrinterName() should be used the PRINTER['NAME'] value

The test case "testPrinterName" is checking the printer name using the Constants.PRINTER['MODEL'].

However the printer-name has been separated as 'NAME' from 'MODEL' in PRINTER.

I think that this test case should be used the Constants.PRINTER['NAME'].

GCP Logo Certification GitHub Tool: For XMPP add TLS Check in Automation Script

Update GCP Logo Certification test automation script suite for XMPP to include a check for TLS (formerly known as SSL) as soon as possible as this is needed for future remaining GCP 2.0 Logo Certifications. Going forward we will not be able to certify partner devices (printers) that do not use TLS for XMPP. Thus, we need to update our automation to check that Google GCP partners use TLS for XMPP, in terms of XMPP client-to-server communications.

This change is needed in order to not allow for the XMPP service to accept authentication credentials in cleartext and transmit user data in cleartext. We need the TLS protocol to provide a way to secure an application protocol from intercepted and tampered with. In terms of stream-based protocol communication, clients must initiate a TLS session immediately after connecting, before beginning the normal XML stream.

Add robot create account test

Use /createrobot API to create new robot account for logged in user
You will need to pass "oauth_client_id" and "proxy" parameters to this API call
And you'll need to be signed in in order to call this API
2. Register couple of printers using robot account generated on the previous step with /register API
3. Call /list API using the generated robot account
4. Call /createrobot using the user user you used on step 1. and the same "oauth_client_id" and "proxy"
5. Call /list API using robot account generated on the step 4, it should return the same list of printers as on step 3.
6. Call /list API using robot account generated on step 1, it should return an empty list now.

AttributeError: 'Nonetype '

I have set up Windows with Python 2.7.x, and have installed all of the dependencies. I believe I have everything configured properly at this time, but when I try to run the tool I keep getting a "NoneType" error. I have attached a screenshot of the error. Can you provide any insight as to what might be causing this?

error_nonetype

Testing order is incorrect.

Testing order is critically incorrect, e.g. testClosedPaperTray() before testOpenPaperTray().
(testOpenPaperTray() end with tray open state, and testClosedPaperTray() expects begining with tray open state.)

Currently, the testing framework sorts the test cases alphabetically.
I think the test cases should be sorted by the line number to resolve this issue.

change PrivetAccessToken and PrivetPrinter API test case to pass when return code is 404

PrivetAccessToken API test case is failing if it founds 404 in response.

PrivateAccessToken API test case should pass with following conditions:
1.Check the response, If Printer doesn't support Local printing before registration.
2.Check the response, If Printer supports Local printing before registration.

PrivetPrinter API test case is failing if it founds 404 in response.

PrivetPrinter API test case should pass with following conditions:
1.Check the response, If Printer doesn't support Local printing before registration.
2.Check the response, If Printer supports Local printing before registration.

Thanks
Surender

testPrintFilePdfColorTicket() Failure

The printout of this test scenario should be in LANDSCAPE but it's not. So we marked it as failure.

I've checked the testscript and noticed that "layout" parameter was not passed when calling chrome.PrintFile(). As you can see from below snippet:

def testPrintFilePdfColorTicket(self):
    """Test printing PDF file of Color Ticket in landscape orientation."""
    test_id = '4bddcf56-984b-4c4d-9c39-63459b295247'
    test_name = 'testPrintFilePdfColorTicket'
    logger.info('Printing PDF Color ticket in with landscape orientation.')
    output = chrome.PrintFile(self.printer, Constants.IMAGES['PDF2'],
                              color=self.color)

I've tried adding layout='LandScape' and it's working as it should. It printed in Landscape format.

output = chrome.PrintFile(self.printer, Constants.IMAGES['PDF2'],
                              color=self.color,layout='Landscape')

Can you please add this change to the testscript? Thanks!

PrinterState() suite failures

We only have 2 failures before namely: "testNoMediaIntray" and "testOpenPaperTray" because our printer is in warning state but the testscript is expecting us to be in error state if there's no media or if tray is open. @YasuhiroFuruta implement a fix for this at #53 and #66 but after running it, we encountered the errors below:

testNoMediaInTray - Failed - state message "Input tray is empty (Tray 1 Empty)" is not allowed

testCoverOpen - Failed - state message "Front door is open (Close door or insert cartridge)" is not allowed

testOpenPaperTray - Failed - state message "Input tray is open (Tray 1 Missing)" is not allowed

testPaperJam - Failed - state message "Paper jam (Paper jam, rear door B. [202.15C])" is not allowed

testRemoveTonerCartridge - Failed - state message "Black toner is removed (Reinstall missing or unresponsive cartridge [31.40C])" is not allowed

testExhaustTonerCartridge - Failed - state message "Black toner is empty (Replace cartridge, 0 estimated pages remain [88.30K])" is not allowed

testReplaceMissingToner - Failed - state message "Black toner level is 92% – 17600 pages remaining" is not allowed

Please have this check on your end.
Thanks!

Local printing availability under unregistered state

It's recommended that local printing is available only if the printer is registered because the document says "a newly connected device should only support the /register api" in [Cloud Print]->[GUIDES]->[Privet Local Discovery]->[4.2. /privet/info API], and many printers support the recommendation.
However, the following test cases expect that local printing is available even if the printer is unregistered.

  • testPrivetAccessTokenAPI
  • testPrivetCapsAPI
  • testPrivetPrinterAPI
  • testLocalPrintGuestUserUnregisteredPrinter

I think these test cases should be removed.

Add Versioning

Add version information to the Logo Certification Tool, to allow for easy identification of what code was used when the test was executed.

HTTP Error 401: Unauthorized

I have gone over the setup and fixed a few issues I had with the config file. Unfortunately, when I run the test, I am hitting an Unauthorized error that I cannot seem to get past. Attached is a screenshot of the problem. Any thoughts on why this may be occurring?

error_unauthorized

Code formatting

Just creating an issue to help decide what is the maximum number of characters per line in our source code. Most places I've worked have set this value at 80 or 100. I'm open to using either.

Sleep timer update request for [testDeviceOffPowerOnAdvertisePrivet]

Chrome browser does not refresh previously discovered local printer list in 60 seconds but sleep timer is set to 60 seconds for this test.
Can you consider updating this value to 120 in order to give enough time for Chrome browser to refresh a printer list?

Test tool: google-cloudprint_logocert-a034a70
test_id = '35ce7a3d-3403-499e-9a60-4d17e1693178'
test_name = 'testDeviceOffNoAdvertisePrivet'

Copies option for local printing in CAPS

Currently, copies setting tests are enabled/disabled by one option ("COPIES") for both cloud printing and local printing.
However, some printers support the copies setting only for cloud printing, and does not support it for local printing, because they can not store entire print data on their memory.

I suggest splitting the option into two options for cloud printing and local printing.

About testLocalDiscoveryToggle and testPrinterOffSendGoodbyePacket

・testLocalDiscoveryToggle

We have manually checked our printer respects GCP Mgt page when local discovery toggled.
But this test result is "failed" and here is the error message:
 File "C:...\cloudprint_logocert-master\testcert.py", line 1841, in testLocalDiscoveryToggle
 self.assertFalse(mdns_browser.listener.discovered[k])
AssertionError:
{'info': ServiceInfo(
 type='_privet._tcp.local.',
 name=u'XXXXXXXXXX._privet._tcp.local.',
 address='\xc0\xa8\xd53',
 port=80, weight=0, priority=0,
 server=u'YYYYYYYY.local.',
 properties=
 {
 'ty': 'XXXXXXXXXX',
 'url': 'https://www.google.com/cloudprint',
 'note': 'XXXXXXXXXX',
 'cs': 'online',
 'txtvers': '1',
 'type': 'printer',
 'id': '82f0ce26-ab86-215f-64af-4293ad10d473'
 }
 ),
 'found': False,
 'proto': '_privet._tcp.local.'
} is not false
※XXXXXXXXXX and YYYYYYYYYY are the names of our printer.

・testPrinterOffSendGoodbyePacket

Using the tool called wireshark we have checked that our printer sent goodbye packet when powered off.
But the result is almost same as Q2. Just the line where error occurred is different.
 File "C:...\cloudprint_logocert-master\testcert.py", line 1929, in testPrinterOffSendGoodbyePacket
self.assertFalse(mdns_browser.listener.discovered[k])
AssertionError: …(the next message is same as testLocalDiscoveryToggle)

When we use the old tool downloaded around Sep. of last year,
The results of testLocalDiscoveryToggle and testPrinterOffSendGoodbyePacket are “Passed”.
But using the latest tool with the same printer firmware, both are “Failed”.
Could you give us some advises to fix these issues?

syntax error in testcrt.py

  1. Using latest testcrt.py, and updated files, getting the following syntax error
    ./testcert.py
    ./testcert.py: line 5: syntax error near unexpected token newline' ./testcert.py: line 5:'

  2. The format of _config.py has changed significantly. Are the instructions in the README file still valid?

Error in setUpModule

I am getting an error in the setUpModule as seen here. Note that this script is being run on Windows 7.

setupmodule

Error in testPrintJpgDpiSetting()

This is the error:
testprintjpgdpisetting

testPrintJpgDpiSetting will call GetOptions().
GetOptions() should return a list of dpi option but it returned a boolean value 'False'. It failed at line chrome.py:671: if not self.UploadFile(filename) since filename '/tmp/testfile.jpg' does not exist.

testChromePrintPageRange and testLocalPrintPageRange issue

Hi Kelly/GCPTeam,

We are having this weird issue under testChromePrintPageRange and testLocalPrintPageRange. This test will try to set the page range to 2-3 but as you can see from the attached screenshot, it failed to do that.

These two tests are frequently failing using Windows 10. We are not sure if this is OS related. We've tried running this test using Windows 7 and everything works fine, there are no failures. We've also tried setting the page range manually and it works fine. We also suspect that this is a network connection related issue. Our internet connection is sometimes slow so maybe that's the cause of this failure or maybe this is a webdriver/selenium issue?.

Windows 10 - Fail
testlocalprintpagerange failure - win10

Windows 10 - Fail
testchromeprintpagerange failure - win10

Windows 7 - Success
testchromeprintpagerange - success - windows 7

Thanks,
Marc

Error in testLocalPrintNotOwner()

This test case fails to create 2nd ChromeDriver object.
The following message is displayed in the console.

Verify local print available to non owner of printer. ... [9072:1224:0727/130844:ERROR:cache_util_win.cc(20)] Unable to move the cache: 5
[9072:1224:0727/130844:ERROR:cache_util.cc(134)] Unable to move cache folder ...\cloudprint_logocert-master\<USER2>\ShaderCache\GPUCache to ...\cloudprint_logocert-master\<USER2>\ShaderCache\old_GPUCache_000
[9072:1224:0727/130844:ERROR:cache_creator.cc(129)] Unable to create cache
[9072:1224:0727/130844:ERROR:shader_disk_cache.cc(589)] Shader Cache Creation failed: -2

Our environment follows:
Chrome: 52.0.2743.82 m
ChromrDriver: 2.22.397933
Python: 2.7.10
OS: Windows 7 Pro SP1 (64bit)

GCP Server can register and cannot print any jobs always queue now.

Our product was GCP 2.0 logo certified.
We found recently the printer can register, however, cannot print jobs.
The root cause is that the type of “numberOfPages” field returned by the /jobs interface is changed. Our code checks that it should be a integer value,
but the value returned now is a string. See below the red line:

{
"success": true,
"request": {
"time": "0",
"params": {
"printerid": [
"a3d31a69-99fd-1d22-91d1-7d6f429f94da"
]
},
"user": "[email protected]",
"users": [
"[email protected]"
]
},
"xsrf_token": "AIp06DgIDmkZzhNapOyc5B8MxA7AwLRjNw:1474420393626",
"jobs": [
{
"ticketUrl": "https://www.google.com/cloudprint/ticket?jobid\u003ddcdd5323-b309-4641-fdba-6f49ea1a2bcf",
"printerType": "GOOGLE",
"printerName": "Printer Devices",
"errorCode": "",
"updateTime": "1474420274394",
"title": "zlib.3.pdf",
"message": "",
"ownerId": "[email protected]",
"tags": [
"^own",
"print_file",
"dashboard"
],
"uiState": {
"summary": "QUEUED",
"progress": "Delivery attempts: 1"
},
"numberOfPages": "2",
"createTime": "1474420273306",
"semanticState": {
"delivery_attempts": 1,
"state": {
"type": "QUEUED"
},
"version": "1.0"
},
"printerid": "a3d31a69-99fd-1d22-91d1-7d6f429f94da",
"fileUrl": "https://www.google.com/cloudprint/download?id\u003ddcdd5323-b309-4641-fdba-6f49ea1a2bcf",
"id": "dcdd5323-b309-4641-fdba-6f49ea1a2bcf",
"rasterUrl": "https://www.google.com/cloudprint/download?id\u003ddcdd5323-b309-4641-fdba-6f49ea1a2bcf\u0026forcepwg\u003d1",
"contentType": "application/pdf",
"status": "QUEUED"
}
],
"range": {
"jobsTotal": "1",
"jobsCount": 1
}
}

The printer check type failed, so it cannot print jobs.

Is it caused by GCP server updates or modify?
Have you got specification description of the JSON response of the /jobs interface?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.