Closed Bug 865159 Opened 11 years ago Closed 11 years ago

Add controls to desktop-helper to generate random contacts

Categories

(Firefox OS Graveyard :: Gaia::Contacts, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sergi, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

It would be useful to have the possibility to add any number of realistic contacts to the desktop-helper for testing.
Attached file Github Pull Request (obsolete) —
Attachment #741232 - Flags: review?(kgrandon)
I'm currently on the fence about adding this.

1 - We can test the add functionality through the UI.
2 - For testing in bulk, we have the reference workload stuff already in Makefile. I believe we should try to leverage what that code is doing so we don't try to re-invent it.

I'm going to ask John Hylands for information about what it would take to get make reference-workload working within a desktop gaia profile. Ideally we would handle these workloads the same way.
Flags: needinfo?(jhylands)
You can certainly do it manually by simply copying the appropriate database to the right directory under your b2g-desktop gaia profile directory. Note that you will need to have a device repo that has reference workloads installed in order to do this. In the following two commands, change the repo directories to match your installation:

cd b2g-device/gaia
cp test_media/reference-workload/contactsDb-200.sqlite ~/b2g-desktop/gaia/profile/indexedDB/chrome/idb/3406066227csotncta.sqlite

then start your b2g desktop. Note for contacts you can copy size 200, 500, 1000, or 2000.
Flags: needinfo?(jhylands)
Sergi - I'm attaching an alternative approach which your patch inspired. This patch makes use of the existing reference workload databases, and allows us to import the existing DBs inside of test_media. 

I strongly believe that we should try to avoid duplication where possible, so I think simply moving the databases into the profile is the correct approach. Please give this patch a review when you have some time and change the review '?' to '+' if you think this is an acceptable approach. Thanks!
Attachment #741232 - Attachment is obsolete: true
Attachment #741232 - Flags: review?(kgrandon)
Attachment #742567 - Flags: review?(sergi.mansilla)
Comment on attachment 742567 [details]
Github pull request pointer

Vivien - Also adding you for review here to get your thoughts.
Attachment #742567 - Flags: review?(21)
Comment on attachment 742567 [details]
Github pull request pointer

That would be cool. I played with contacts database last time and I got to copy-paste it by hands. I believe this is useful to have it here - even if this stuff does not replace a real test on the device.

Kevin at some point on the future I wonder If it would be useful to add a new section device to the panel. I can already imagine 3 options:
 - Send the app to the device (our APP=... basically. But that would be a cool workflow to develop on the browser and then try on the device without switching to command line).
 - Use workloads. With the same things than the one you linked. That would make it easy for people to use then and I believe they will use it more often.
 - Take screenshots

This is out of the scope of this bug but I wonder how cool it could be.
Attachment #742567 - Flags: review?(21) → review+
Landed in master: https://github.com/mozilla-b2g/gaia/commit/32015f82ff7fc844913085ab0714a31a98da1c83
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Attachment #742567 - Flags: review?(sergi.mansilla)
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: