View/test Amazon Mechanical Turk qualification published to sandbox - mechanicalturk

What is the proper way of publishing and then testing a qualification test in the amazon mechanical turk sandbox?
I'm trying to test out a qualification test in the sandbox by viewing/taking it as a sandbox worker, however, when I go to the given URL, the page says "Sorry, we couldn't find that page."
I'm using the command line tools. I create the test like this:
./createQualificationType.sh -sandbox -properties test.properties -question test.question
Which completes successfully and prints:
Sandbox override
Created qualification type: 33RG09AB3LBTH7EBTMTWQEKYEKOTQA
You can take the test here: https://workersandbox.mturk.com/mturk/requestqualification?qualificationId=33RG09AB3LBTH7EBTMTWQEKYEKOTQA
where the long string is the qualification type's ID. However, when I try to access the URL, I get a page that says
Sorry, we couldn’t find that page
Strange... the page you were looking for is not here. Let’s go home and try again.

I wasn't able to get the test link working. To try out the test, I attached the qualification type to a sandbox HIT and then went to the HIT as a sandbox worker.

Related

Unexpected error when attempting to sign via Docusign

We are automating scripts with Selenium, part of which is to sign a document with document. There is a docusign community forum but we just have a demo docusign account with one user, and I do not think that can send email to the community, so I thought I could ask here.
We are getting the envelope ID of a document, and then requesting the page and logging in. This is the URL:
https://XXXdemo.docusign.com/documents/details/{ENVID}"
(I used XXX here for the first three characters for security). Also, I replace {ENVID} with the actual envelope ID.
This has been working, and still is kind of working. We do signs and advances, etc. Often now, in the middle of a sequence of steps (signing, advancing, etc) we get the login page again and the error message: Invalid Managed Token ID and / or secret
(see attached image).
I did talk to some developers who told me to clear the cache before running the test. The only problem is that our Selenium tests (which are running in Chrome) start with a completely new, empty cache, bookmarks, etc.
I thought that maybe the envelope id was expiring, but a developer said he did not believe that was the case. Any suggestions what could be happening?
Specifics:
- We create a document in Salesforce and send it to Docusign for signature.
- We are using Selenium, Java and the latest version of Chrome.
- This appears to happen at different Docusign places, and sometimes not at all. Often happens when clicking "sign"
- A google search for the error message returned only two results, neither of which was too helpful.
- The picture below is after having signed in and running for a while.

How do you break a persistent login in a Codeception acceptance test?

I recently took on a new role at work in the form of using Codeception to create acceptance tests. As this is a learning experience for me I have been dumping a lot of questions onto Stack Overflow. Thanks for all of your help! But here is my newest dilemma. First of all, I am running a cept test. First, it logs in to a website, runs a bunch of tests, then logs out:
$I->am('user');
$I->amOnPage('/');
$I->wait('2');
$I->amOnPage('?realm=ab-cd');
$I->amGoingTo('Login to website');
$I->fillField('username', 'REMOVED');
$I->fillField('password', 'REMOVED');
$I->click('Sign In');
$I->expect('Signing In');
// Should be on dashboard
$I->wait('5');
$I->see('Dashboard');
$I->see('Messages');
$I->see('Assignments');
$I->see('Reports');
$I->see('Help');
$I->click('Sign Out');
$I->expect('Signed Out');
$I->wait('5');
$I->makeScreenshot('Screenshot');
$I->seeCurrentUrlEquals('/');
The screen shot it takes is as if it never logged out. I have tried both clicking the sign out button, and also using the id(as above) to select the sign out button. The problem here, is that i have multiple tests running and when this does not sign out, it makes my next test fail. Is there a way to force sign out a user doing a cest test?
I saw in articles about an issue like this a few years ago, but looks like since has been fixed. I tried all recommendations from those articles. Any thoughts?
The link in question that provides the Sign Out:
<button id="log-out" class="red-btn">Sign Out</button>
UPDATE: After adding the line $I->seeCurrentUrlEquals('/');
An error occurs:
[Facebook\WebDriver\Exception\UnexpectedAlertOpenException] Unexpected modal
dialog (text: Fallback login. Enter password): Fallback login. Enter
password
Why do you go to / after logout?
Shouldn't logout take you there automatically?
Your test is not checking if it logged out successfully.
Expect method is just a comment.
Use see or seeCurrentUrlEquals to verify success of logging out.

What is my google-signin-client_id

My web site used to have a link to let users login with their Google accounts in Open ID 2.0. Since 20.4.2015, this is no longer working, so I am trying to migrate to Google Sign-In.
This page:
https://developers.google.com/identity/sign-in/web/sign-in#specify_your_apps_client_id
says:
Specify the client ID you created for your app in the Google Developers Console with the google-signin-client_id meta element.
I have no idea what my client ID is. In my Google Developers Console:
https://console.developers.google.com/project
there is only a single, very old application I created with GoogleApp, which is not related at all to the website I am talking about. I tried using its project ID anyway, and got the following error after clicking the sign-in button:
401. That’s an error.
Error: invalid_client
The OAuth client was not found.
Request Details
fetch_basic_profile=true
scope=email profile openid
response_type=permission
redirect_uri=storagerelay://http/localhost?id=auth684995
ss_domain=http://localhost
client_id=imitatorgwt.apps.googleusercontent.com
openid.realm=
That’s all we know.
What exactly should I write in the google-signin-client_id meta tag?
You need to create/configure a Google OAuth client. For detailed instructions on how to do so for Google OpenID2 -> OpenID Connect migration, check out Google's migration dev docs (in particular the pieces related to Google Developers Console).
A possible work-flow is:
Go to Google Developer Console.
Under "Select a project" on the top, select "Create new project" and fill the details.
In the dashboard on the left, go to "API & Auth" -> Credentials.
Under "OAuth", click "Create new client ID".
Under "Application type", select "Web application".
Under "Authorized Javascript origins", enter the URL(s) of your website. The "Authorized redirect URLs" are updated automatically.
Click "Create client ID".
The new client ID can be accessed any time by going to "Credentials" in the left dashboard. It looks something like this: "3453453452345-dfgjw3456u2094mlfg45p.apps.googleusercontent.com".
Hope that helps!
UPDATE
We have updated the referred documentation with instructions on how to create Google projects+client ids, see https://developers.google.com/identity/sign-in/web/devconsole-project. That should make things easier for developers in the future.
Again, thanks for reporting the problem!
Having implemented "Google Sign-in for Websites" in a couple of projects, at first the Google guideline confused me a bit at the following line:
<head>
<meta name="google-signin-client_id" content="YOUR_CLIENT_ID.apps.googleusercontent.com">
</head>
The line <meta name="google-signin-client_id"... at first got me thinking that i needed to place some google-id here.
Now to answer the question:
What exactly should I write in the google-signin-client_id meta tag?
<meta> is part of HTML standard, and this tag provides metadata (or information) about the HTML Document. Metadata will not be displayed on the page, but will be machine parsable. source: w3schools html reference.
Therefore just remember that the "name" attribute of the tag just literally specifies a name for the metadata. In other words, it just describes the "content" attribute. Try changing name="google-signin-client_id" to say name="my-content" and see what happens.
Always remember: the best way to learn is try, fail, debug and correct.

Not Qualified to work on this HIT in Sandbox Envrionment

I am trying to accept a HIT as a worker from sandbox but every time it shows following message.
"Your request for the Qualification "Categorization Masters" has been submitted to Requester Amazon Mechanical Turk"
Can anybody say what I am missing here.
The sandbox works just like the live site, as in you (as a worker) have to be meet the qualifications in order to accept a HIT. This means if you're trying to complete your own HIT in the sandbox just to try it out, you have two options:
Remove the QualificationRequirements from the HIT so you can complete it.
Obtain the necessary qualifications in the sandbox in order to satisfy the requirements.
Option 1 is easy (and is what you should do). Option 2 is difficult, or maybe impossible.

google app script gmail testing

I want to make a clean up script for Gmail to my needs. I happy to use a script, which code I found in a blog, but now I need to modify it.
How can I test it without risking my Gmail box? I'm not good or experienced inJS, so I'm pretty sure there will be some mistakes. And I don't want my emails messed up. Is there a sandbox, or some kind of testing environment?
No, there is not. You should create a test account for you to work with.
Also, when working with your account. You could always just log an action instead of doing it. i.e. instead of
thread.moveToTrash()
do a
Logger.log('move thread "'+thread.getFirstMessageSubject()+'" to trash');
Then check menu View > Logs to verify the actions your script would do. You could also create a TEST variable and use it as condition in your code to determine if it should perform an action or just log it (or both).