Testing JavaScript without the codebase [closed] - javascript

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I know it is a weird question, but wanted clarification nevertheless.
Assume there is an application and the testing team has access to this application only through a URL, with no access to the codebase.
My question is, can one write say jasmine test cases without access to a code base by only using the URL.
PS: My opinion is that it is not possible, because I think it doesn't fit the idea behind which most of these testing frameworks are created.

When accessing the app by URL, does the team have any access to inputs/controls of the app? If so, they can write test cases using something like SilkTest instead. I haven't used Jasmine, but it looks as if it tests actual code itself, rather than doing automated testing on the app as if it were a user. In that case, if your code on the URL is obfuscated or encrypted, then no, they can't test it. If it's plain Javascript code, then they can see it all right in the browser, and write test cases based on that.

Related

How to use swagger/openAPI on MarkLogic REST APIs for generating documentation? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have a bunch of REST APIs (GET/POST methods) written in SJS and I want to use swagger/openAPI for documenting it. I found one GitHub repo with some code but not sure as to how to run/use it with my project.
Link: https://github.com/overstory/marklogic-swagger
PS: My choice of IDE is intelliJ.
Please advise on the steps for the same. Thank you!
I am unaware of tools that can analyze a REST endpoint, and generate Swagger or OpenAPI for it. AFAIK, there are also no tools to generate any such thing from MarkLogic REST extensions or custom MarkLogic REST implementations. It is difficult to write a generic tool that would be able to do so. I am afraid you will have to manually type it, or write some script yourself that is able of generating something useful for your case.
HTH!

Does the php code always mix with html code? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
In web development, does the backend code always mix with the front code at some point? Checking jsp and some php I see that the code is usually mixed, is this a bad practice or should you always avoid using javascript as an intermediary?
Normally it depends on what you really want to do. But they are usually mixed
PHP was developed as a templating language for web, so basically it is what it was created for. But you might notice that in modern projects PHP used mostly as an API backend for Javascript application. In such cases, it will not be mixed.
It seems to me that it depends on the project type. But even if you do not use modern JS frameworks try to separate business and frontend logic. Check the MVC architecture or DDD.

iOS - What programming language does Parse use? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I've heard of Parse recently and how it's a good service to use for building a back end for an iOS app, but I can't find ANYWHERE that states what programming language I'll need to write that backend code...PHP? Javascript? Java? Which is it?
All I'm reading about are iOS sdk's, Javascript sdk's, etc. I just want to know what programming language I need to know in order to write backend code with Parse.
You can create your parse client code in Swift or Objective-C but If you would need to write cloud code then you can write code in javaScript.
Here is a simple tutorial that describe the complete scenario how to startup a totally parse.com backend.
1-http://www.raywenderlich.com/98831/parse-tutorial-getting-started-web-backends
2-http://www.appcoda.com/ios-programming-app-backend-parse/
Hope it will help you to create wonderfull apps.

How to create a new file in a folder using javascript [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am making a web application using javascript. I want to know
1) How can we create a new html file using javascript?
suppose I have a folder with locationexamples\new Files\. so I want that if some one click a button on my page then a javascript function runs and then creates a new html file in new Files folder with a specific text defined by the user.
Is there any way to do this or
Do i have to use different languages?
Javascript that is used in browsers, like jQuery, has no access to the filesystem. It is a security restriction, otherwise any tom dick or harry on the internet could seriously mess up your computer.
The only filesystem access allowed is Cookies.
If you want to achieve something like this, you will need something like node.js, although I have no experience with node.

Is it a bad idea to build integration tests purely with Javascript and run in the browser? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
We are experimenting with different methods of integration testing. One option we thought of was to build something purely in Javascript and run in the browser. These tests would use jQuery to navigate and fill the DOM and then run simple comparisons to return true or false.
We built something quickly to try the idea and it works well. We run the script in the console of a browser. We created several identical tests with Capybara and Selenium and our method runs just as fast.
I searched and couldn't find anyone else doing this and was wondering if there is something I'm not realizing that makes this a bad idea.
Many libraries do it: QUnit and JSUNIT are two examples
But you can use Selenium WebDriver to do a lot of it without JavaScript.

Categories

Resources