Testing Your Site
Revision as of 21:28, 22 January 2021 by Riley.McCuen (talk | contribs) (Needs more work, specific JSON keys and values need to be described and examples provided)
After you have finished building your site and testing it locally you should always test is in Amazon's MTurk Sandbox. The MTurk Sandbox is essentially the exact same thing that real MTurk workers use, except it is for requesters to test their HITs. When you submit to the sandbox and and accept the HIT you get to see how your HIT will actually look to the workers who will eventually do your hit. Now that you have a little bit better understanding of what testing on the MTurk Sandbox means, here is how to do it:
- You will need to set up a credentials file that will be used by a javascript script in your repository to do the submission
- Create a JSON file at the highest level of your repository named aws-credentials.json. For example if your repository was named information-foraging-foo.bar then your file should be located at information-foraging-foo.bar/aws-credentials.json.
- Now copy and past the below code into that file:
{
"": "",
"": "",
"": "",
"": "",
}
- Now that you have that code in the file, replace the part that says 'your access id key here' with the AWS Access ID that you set up earlier and do the same thing for the part that says 'your access secret here. Your file should now look like:
{
"": "",
"": "",
"": "",
"": "",
}
- Now that you have set up your aws-credentials.json file there is one more configuration step that you need to take care of. You must put your websites home page url into your projects package.json file. You can see the package.json file is also at the top level of your repository.
- Open up package.json and look for the key: . Replace the value of that attribute with the url that points to your project's Github pages homepage.
- Now that you have configured your project you can go ahead and submit a hit. Open a terminal and run this command: 'npm run sandbox'.
- That command will send a HIT to the MTurk sandbox on your behalf. Now log into the MTurk Sandbox Worker site and you should see a big list of HITs.
- If you sort the HITs by the time that they were created you should eventually see your HIT come up. Be patient as it can take about a minute to be published.
- You will know it is your hit because the requester listed on the far left side will be your MTurk requester account username.
- Selected accept and work for your HIT and then you can complete a HIT based on your website.