How to inject multiple responses on a google forms with code? (as owner) - forms

So i got do an example with data from a really big forms and i'm looking for ways to inject big bulks of fake data responses randomly. What is really my questions is if there is a known best way to go about that.
Btw this is all for a project which i'm suposed to use fake data just to simulate for now.
I been looking for solutions by using webdriver, app script or somehow inject direcly at the docs sheet. It would be about 500 responses or more so cant be by hand.

Related

Setting up REST-API on top of GraphQL-API (using apollo gateway?)

I am working on a GRANDstack (GraphQL-React-Apollo-Neo4jDatabase) project and got told that it now needs an additional REST-API without making huge changes to the existing backend and GraphQL-API. And of course we have to be quick about it.
We found this (Apollo Gateway): https://medium.com/tkssharma/an-api-gateway-is-a-microservice-pattern-where-a-separate-service-is-built-to-sit-in-front-of-your-be4b16861d40
We plan on using this to set that new REST-API on top because we know we will need microservices soon enough as well. So I guess, this can be set up in some form with the already included Apollo. But I have yet to fully understand it.
Does anyone have some experience with this? Or does anyone know a project that implements this and can be checked out? I'd like more material about this that contains actual code. Especially about setting up such a gateway to put a REST-API on top.
If there is something easier and better documented than this Apollo gateway, please let me know! Open to ideas, but not complete overkills (Though we are not allowed to just put REST directly into our backend, it has to stay quite untouched).
Thank you very much!
In short: Our current backend offers GraphQL-API which works just fine. But one of our customers (in this picture "client") needs a REST-API. So we hope on using a gateway (?) which should be placed before/upon our backend in a separate docker container probably, takes in HTTP-requests from the user and then asks our backend in graphQL for the needed data.
If anyone ever stumbles upon this, we decided to do the following:
Since we have to be quick about it, we will set up another docker container, that contains a small server, which accepts data via a REST-API. Depending on the received data, it calls specific GraphQL-Queries/Mutations on our backend. Easy. No additional 3rd-party software. Simple just wins.
Have a good one!

Flutter/Dart: Communication between features in Clean Architecure

I'm new to flutter/dart and I'm trying to create a little application using a Clean Architecture design.
I read some blogs and several presentations of Uncle Bob's Clean Architecture before starting to code to get the most of it and now it's time to implement it.
I guess my application could be divided in 3 main features :
authentication
classes (get access to lessons/quizzes on specific subjects)
admin (manage user, create lessons etc..)
I started to implement the authentication feature following the clean pattern, that's to say with a domain, data and presentation layer and I guess I did it quite well. It's (almost) fully tested (I'm trying to do some TDD) and seems to work as I wanted.
Now comes the problem. I want to implement the classes feature. I wish it could be independent of the authentication but it's not the case... The classes feature need to get the authenticated user from the authentication feature. I searched a lot on the internet but I can't find how to implement Clean Architecture with multiple features that need to share some data.
So there are my 2 questions:
How to pass data from a feature to another ?
How to inject dependency in a feature that need data from another feature ? (I used get_it for the authentication feature and inject all dependencies in the main() method before building the app. Since it did not need any external data it worked well. Now it's seem not possible to do the same for the classes feature since it first needs to get some data from the authentication feature).
Thanks in advance for your answers.
Along with your 3 features you should add another called core and inside that folder you can add stuffs that need to be shared. It worked for me . Good luck
One option is if you instantiate classes after the user has already logged in, you can pass that data in as a constructor parameter.
More generally, Provider is probably the best dependency injection tool for flutter. If you "provide" the authentication class to the widget tree for the rest of the app, you can say at any point below it, Provider.of(context) to access it and any public field it has.
Hope you're still working on Flutter projects after that long time.
I've been fiddling around with Uncle Bob's Clean architecture, and I managed to implement it in Flutter few months ago.
It's perfect, it separates your code into components (modules if you're coming from a native Android development environment) and isolates your data sources, so if you want to change the way you make API requests for example, you'll only need to change the remote data source part in your app, and all your application should work as expected.
I have made a test app using Clean Architecture I just uploaded on github and added a humble readme that describes the basic architecture and components of the app, I'll work on written articles describing the code very soon.
For now you can access the repo from here
I'm trying to find an answer to this for some time now... My solution was to create some transformation methods in the model class. For example, I have an ProductModel in the home feature file (from where i can add products to the cart), and an ProductInOrderHistoryModel in the order history feature file. So in the ProductInOrderHistoryModel file I have a method called toProductModel that gets an instance of ProductInOrderHistoryModel and transform to a ProductModel. That way I can add a product to the cart directly from my history order page.
Probably it's not the best solution, and the Uncle Bom would be really mad at me. But it was how I manage to solve my problem...

A/B Test a Page Step in a Single Page without a new URL

I am trying to figure out how to run an A/B Test for a change on a Page Step for a Single Page. The idea is we have a payment flow with several page steps each containing a form. We'd like to swap out forms and test how our users react. We are trying to avoid changing the URL.
I looked into tools such as Google Analytics, but that requires a different URL to run the A/B test. The hesitation about creating a new URL is because our users are known to bookmark them, and we don't want to keep a backlog of redirects from invalid URLs, also we'd like to avoid constantly deploying new URLs for our tests.
I cannot seem to find any tool to do this, so I've tried to think of a few solutions but I'm not having a lot of luck.
My best idea is to build both a and b forms into the page, and when a user accesses the flow, the session randomly(based on a preset%) stores a value that dictates whether the user is in test a or b. Then when they step into that form, the server will serve the proper form to them. If they abandon their session, we'd track that, and if they complete the action, we'd track that.
I feel like there should be a better solution, but I just cannot come up with one.
My results online were either blogs showing how to approach it from a high level, and all of them used different URLs, I have found almost no developer resources.
Thanks.
We're using ExtJS 4.2.2, and .NET as our server.
Whenever you need the server to be involved, you need server-side instrumentation. No free tools offer that, but you could consider Optimizely "full-stack" (has support for C#) or Variant (does not yet).

Stress testing of flow (Rest) with JMeter

I have a rest service which receives a customer's ID and an input, acording to this the services response something different, it's basically a menu, but the reponse could be different (depends on the customers input), so I need to stress this service to see how many request the server can handle and try to determine the max TPS, but since is a flow I don't know how I can simulate this, any idea or page that can be useful?
Thanks in advance for your help
What you mostly need is an understanding of how to handle dynamic parameters. Imagine you are simulating a user which goes on a blog, views a random blog article and then posts a comment about it.
It's all about designing a user which has a dynamic behavior, which changes depending on variables or server output. JMeter supports this kind of simulation very well by providing dozen of useful components like:
CSV Datasets,
Regexp Variable extractors,
and more.
We have written an article which explains how to simulate users with a dynamic behavior. It's very similar to what you would do in JMeter since OctoPerf is based on JMeter, with a Web UI built on top.

Displaying web based visualisation or graphing of data based on a postgresql database?

I am working on a web application for a client that uses a postgresql database. I want the client to be able to go to a certain area of the site where the data from the database is displayed in graph form (for example, sales figures over a 6 month period). Is there a plugin I could use for this (I don't have any experience of this, so an easy one, or one with tutorials available would be great). I had a look at BIRT, which says it has a web based option but I couldn't really figure it out. I don't want the client to have to download and go through another program, I just want them to go to a url within their site, and it's all just presented to them there and then.
Any sort of pointers in the right direction would be greatly appreciated.
Thank you.
HighCharts, at http://www.highcharts.com/, works well for this case -- I use it fairly often. It supports Ajax data feeds in JSON format, so you can write an endpoint which returns the JSON representing the data from Postgres and which gets called from a JavaScript function which creates the graphs using that data (you would place that call in a ready function).
Also, if you're using Postgres 9.3 or higher, it supports JSON natively, so you can do the JSON conversion in the SQL query itself, as opposed to post-processing the results in your Python or other backend code.
Highcharts is reasonably flexible and allows for a variety of nice-looking, functional charts and graphs. If you want to get much fanicer, d3 may be worth a look. These are some the types of graphs/charts it can do: https://github.com/mbostock/d3/wiki/Gallery
I have not used d3 myself, however.
For the scenario you described above, Highcharts seems like it would work just fine.
It's been a while, and a lot has happened since 2016. There is now ChartJS as well - http://chartjs.org/, for example, which is easier to use than HighCharts and very flexible (I've used both).
What they both don't do is dynamic data. If you want that your client decides which data he wants to watch - that part you need to write yourself.