Pre-req Postman Variables Stopped Working - postman-pre-request-script

I have an incredibly simple pre-request script that was working just fine on my Mac using the lastest Postman. I was sharing the workspace and Postman was constantly nagging me about not paying, and my sharing partner wasn't looking at the work so I turned off sharing. That took out quite a bit of my work unexpectedly and I had to rebuild many queries. My queries are working now, however, my super simple script isn't. My sole variable is no longer being populated. The code is the same that was working until I deleted the sharing profile. Any ideas?
var moment = require('moment');
pm.collectionVariables.set = ("onehourago", moment().subtract(60,'minutes').unix());
{{onehourago}} is an unresolved variable. What gives?
Thank you, from a novice.

Careless idiots should not waste others time. = sign? Really? Delete that and Postman works just fine.
pm.collectionVariables.set ("onehourago",moment().subtract(60,'minutes').unix());

Related

How to apply a test for a whole collection or folder?

I have a collection with a couple of folders. I would like to run a test for all the requests on a given folder or collection. It's a simple response time test, but it's quite annoying to copy/paste for each request this test. Is there anyway to run a test for all requests on a folder or collection?
You can use the runner for this.
Check out the documentation on that here: https://www.getpostman.com/docs/running_collections
Just had it straight from a Postman's developer on their Slack channel: there's no such feature, but might be interesting to have it.
I hope it helps. I also hope it helps to make people think twice and giving it a try to understand the question before downvoting.
There is a feature request ticket for this (about 1 year old)
https://github.com/postmanlabs/postman-app-support/issues/2247
But I found a workaround on this thread
https://github.com/postmanlabs/postman-app-support/issues/882
The dlopuch post gives a working solution.
You store your test methods into a variable. and when you need a test you just get the variable and eval it. You then have an object with all your tests functions on it.
I tried and it works fine.

integrating a database with easy manual maintenence

I have some information I want to try to integrate into a project I'm working on. It would be "publically maintained" by volunteers in the community I would be working with.
The idea I had was to keep things simple for the people doing the maintenence: I would give them access to a shared google docs spreadsheet and let them do their thing when stuff needed to be updated. I would update the database using this spreadsheet on some automated daily or weekly interval.
I've never worked with databases before. My project is in C++ and my searching around for a database to use seemed to point to sqlite. The data wouldn't be anything complex, just a unique id with a name. maybe an additional piece of information but unlikely.
I'm mostly concerned about getting the data to be an actual database. I looked around for some conversion tool(I assumed spreadsheet -> database would be trivial?). I'm up for any ideas on how to make this work. Thanks
Using google docs with output as tsv/csv and sticking that in sqlite will work fine for me, thanks.

How to solve cache? issue when using jasmine standalone

When I go to SpecRunner.html in my browser, the unit tests run fine. The issue I am having is if I change one of the tests, or the code that it tests and refresh the page, it doesn't load the new tests or change at all. I thought that this would be a cache issue, but I have the chrome dev tools disable cache selected.
What am I doing wrong?
Thanks
EDIT: tried restarting my computer, nothing. Clearing cache, nothing. I don't understand why this would be happening.
EDIT2: tried force reload, nothing... changed the file name and reference and still loaded the old code...
This might not answer your specific problem, as there are a million reasons this could happen.
For me, it was because I had deleted some files and then re-added them as a git submodule. After doing this, ls was showing me the OLD files, and I didn't realize that I had to go up a directory and then back in to interact with the new files I had just pulled down.
Old question but I ended up here when looking for an answer, so here's my solution in case it helps anyone - I was having a similar problem with jasmine-rails, removing jasmine-specs.js from public/assets did it for me. I'm using the jasmine-rails gem from https://github.com/searls/jasmine-rails.

[Neo4j] Impermanet database stored in filesystem

there's a problem with my Neo4j-Test-Setup-Environment and the org.neo4j.test.ImpermanentGraphDatabase...
I have a class, TestGraphPopulator, for setting up some dummy data for my unit tests.
Because of adding, delete, update operations in my tests, I populate the graph in every test case in init-method annotated via #Before.
But there is some really strange behavior sometimes.
Some of my test fail, because there are more or less entities as expected. In a second, or third, etc. run, everything is fine, ..or not.
AND, in my /target directory of my project, there is a folder \target\test-data\impermanent-db with all the Neo4J database data...
I'm not sure of what my problem results of, but should NOT ImpermanentGraphDatabase only reside in memory??
For me, it looks like a bug, could anyone share some experience?? This seems very important to me, and maybe others...
Thanks a lot in advance!
Markus
P.S.:
Neo4J 1.8, Spring Data Neo4J 2.1 ..
This is indeed what has happened to me, too. It is confirmed to be a problem, and was recently fixed. I have confirmed that no files are created when I use 1.9-SNAPSHOT.

Inconsistent 'Cannot find CFML template for custom tag' error

I have a CF9 site set up locally on OSX Snow Leopard, and it's started to behave very strangely - probably about 1 out of every 5 times I load any page in the site, it will throw a 'Cannot find CFML template for custom tag' error. I just refresh the page and then everything works fine. It can happen on any page, but it never happens consistently with any one page. Furthermore, this doesn't happen at all on the live server when the code is checked in through SVN, so I figure it has to be some kind of configuration problem on my local instance. I can still do my work, but it's pretty annoying having to refresh pages ALL the time. Has anyone run into similar difficulties?
Try using <cfmodule template="pathTo/yourTag.cfm"> rather than <cf_yourtag>, so you can specify the exact location of the template (in case the server is getting confused as to where it resides).
FYI, this is based on a tip from Raymond Camden's blog post: http://www.raymondcamden.com/index.cfm/2006/8/17/ColdFusion-Custom-Tag-Tips
Chris, odd that I should run into your question now, as this just started happening to me last night. I have all of my CF errors being emailed to me, and I am seeing that similar problems are happening across multiple sites that all run the same software, some of which haven't been touched in a long time. That got me thinking, it's probably a corrupt compiled template in the CF cache. You can recompile the template by making a slight change to it, say add an extra line or a comment or something, then access the site again. Or, purge the whole cache and let CF rebuild everything, which is likely what I'll do since who knows what else might be affected.
Clearing the Cache in Coldfusion Production server