How can I determine what percentage of Github projects contain unit tests? [closed] - unit-testing

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 8 years ago.
Improve this question
I'm working on a presentation about unit testing and TDD. One statistic I'd like to share is the percentage of Github projects that contain unit tests. Is this data available somewhere?
If not, is it possible to obtain through a Github API? I was considering a simple file-based approach based on project type (see if a Java project has any files ending in Test.java, or spec.rb for Ruby), but I've never used their API and don't know how feasible this is.

I don't think there's any API to provide you with that information.
Or at least not without browsing the entire set of repositories, which would not be practical anyway. You might want to suggest the github staff to conduct such a survey themselves, but that will be up to them :)

Grab the list of Java repositories from the Github API (use search and the language parameter), then clone each repository, look for Test.java or whatever and collect your results. I don't think there's a way of doing this without cloning each project though.

Related

Documenting Unit tests in Go [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 1 year ago.
Improve this question
Whoever writes unit tests in Go, how are you documenting them?
Is there some kind of 'docstring' (like in Python) convention?
If so, how do you maintain this documentation afterwards?
Is it possible to generate Docs based on the description from Unit tests with some automatic tool?
I am asking because as a QA person in my team i wish to document those tests and maintain them as a part of an ongoing dev cycle.
Whoever writes unit tests in GoLang, how are you documenting them?
Not in any systematic way (if at all).
Is there some kind of 'docstring' (like in Python) convention?
No. (For executable examples there is of course.)
If so, how do you maintain this documentation afterwards?
NA. Nothing to maintain.
Is it possible to generate Docs based on the description from Unit tests with some automatic tool?
Asking for 3rd party software/libraries is offtopic on SO.
about automatic documentation, take a look on godoc - https://go.dev/blog/godoc
i don't know about specific usage of unit-test in golang (everyone using it - same as in other languages), but besides them bdd is also popular, for such a stuff take a look on godog - https://github.com/cucumber/godog
about Asking for 3rd party software/libraries is offtopic on SO - golang is all about 3rd party libraries :)
p.s. probably you can use pattern godo(.{1}) to find any packages for go :)

How to architect/design a knowledge base to solve issues from its history analysis? [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 5 years ago.
Improve this question
I have a ticketing system (lets say JIRA or similar) for my application to file an issue of my application. Now my requirement is to build a knowledge base in a way so that I can predict the solution of any similar issues in future by churning that knowledge base.
To explain further, the knowledge base would give me how many times this kind of issues have arisen in past and what have been the root cause of it in most of the time (lets say 80% time). This way the repository should have an analysis of each and every issue and its possible root cause plus many other relevant information about the issue.
Just to start off to build such a knowledge base, I need to know following things:
What is the most commonly used technology/mechanism available to achieve this ?
How do I need to architect/design a system to be able to serve this kind of requirement?
Does it require to learn any particular language/database ?
I request community experts to enlighten me with the required information and pointers to give me a starting point at least in this direction.
Thanks.
I would suggest against a ‘reinvent the wheel’ approach.
There are perfectly good tools out there that achieve your required use cases. Look at ServiceNow or Desk.com as CRM for tickets, or if you just want a Wiki that integrates with Jira, look at Atlassian’s wiki.
You can also generate reports from Jira itself, not sure why anyone would want to build his own when there are such great tools out there.

How to know project is using only TDD [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 5 years ago.
Improve this question
I want to provide tests statistics of TDD usage in a company, so I need to identify which projects are using only TDD, or if there are tests code written after coding. I thought using time stamp file change info, but Does anybody have a better solution for this?
A pretty broad question, but I think there is actually a fact based answer.
That answer is: you can't solve social problems on the technical layer.
In other words: already your goal/requirement is flawed: you will not be able to generate those clear statistics. You might be able to apply some heuristics; but unless you get access to all information from all developer systems, timestamps wont help you. You see: the normal approach is to do some coding; and at some point release all of that into the version control system.
So, sometimes it might be clear from timestamps that X was written before XTest; but very often, X and XTest will be released into the library within one commit. Now - which one was written first?
Thus: start thinking on the "social" level first. Meaning: talk to the development teams. Ask them about their practices. And when they claim to do TDD; then look into their specific commit history and see if that tells you anything.
Usually following the Test Driven Development practice implies continuous repeating of small Red-Green-Refactor cycles. As #GhostCat stated, looking into the commit history is is an excellent point to check if the devs follow TDD principles. Every change in the production code should be reflected in a corresponding unit test.
You may also check the code coverage. The high coverage is not the goal but it can be a good indication if the TDD practices are followed.

Django: how to zip all html/css/js files? [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 8 years ago.
Improve this question
I'm building my new website using the great Django framework and I would like to bundle all
js/css/html together for external design work.
Do you know any tool that might come up handy?
Or maybe there is another option for external designer to work on my project?
10x
The normal option is to use a revision control software which not only will let you share the needed code but also continuously integrate the changes without conflicts when one of the developers changes something. Of course compression of resources is automatically done by those software.
No serious developer, even alone, works without such a source control software.
There are online solutions if you can't set up a server, for example https://github.com/

Mantis and Redmine, which one is better for issue tracking? [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 9 years ago.
Improve this question
I consider to use Mantis or Redmine to manage projects. (Issue Tracking)
I know both are really good.
For now, I won't connect it with SVN or Git.
(It may happen later)
The main purpose is issue tracking on business with co-workers.
Please recommend one of them, or you can recommend the other one.
Thanks.
I can recommend redmine. I've been using it for more than 2 years, with 25-50 simultaneous users and more than 50 projects.
I went through a lot of updates without ever having any problems.
The database is properly normalized, so if you ever need to retrieve any data, you will be able to do so.
Numerous plugins exists which may cover special needs if there are any.
Edit: In the meantime, I had to change over to Jira, but I'd go back to redmine anytime if I could.
Never used Redmine, but we've been using Mantis for about 7-8 years for many projects for our distributed team. One of the benefits is its simplicity. We've even wrote a couple of our own extensions, e.g. widely used in our process Kanban board (one of the Agile approaches).
Sometimes I think it looks slightly outdated among other modern tools but it really works for us and we can extend it with our own PHP code.