Skip to main content

Questions tagged [testing]

Software testing is any activity aimed at evaluating an attribute or capability of a program or system and determining that it meets its required results.

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 views

"The outcome of running a test should not depend on the current state of the environment, and each test should leave its environment in the same state it found it in. In particular, a test should ...
Mitu Gabriel's user avatar
3 votes
4 answers
487 views

I'll often make changes to my init.el and find that after I M-x load-file, the results can be different next time I open emacs. Or maybe while one thing I modified gets better, something else gets ...
Mittenchops's user avatar
0 votes
1 answer
50 views

I am experimenting with writing elisp in a more scheme-y style where helper functions are definded inside another function's lexical envirnonment like this (with lexical binding turned on): (defun my-...
dandy's user avatar
  • 15
1 vote
1 answer
180 views

I'm writing an app in python, which I will run in docker. Therefore I want to test it in docker as well. I'm working in spacemacs and want to use the tools available to test. With projectile this is ...
Harm's user avatar
  • 131
0 votes
1 answer
48 views

I want to use my org-mode documentation as a sort of quasi-unittest; I want to execute the whole buffer, and be notified if marked cells' new results differ from their previous results. E.g, #+...
HappyFace's user avatar
  • 930
1 vote
1 answer
91 views

I'm writing tests for an interactive function. I've been using the unread-command-events variable in conjunction with call-interactively to verify that it does the right thing. However, I just ...
Lindydancer's user avatar
  • 6,300
1 vote
1 answer
78 views

When running ert tests, the seem to be run by default in string< order. For instance running tests (require 'ert) (ert-deftest t1111 () (print 'AAAA)) (ert-deftest t3333 () (print 'BBBB)) (ert-...
kdb's user avatar
  • 1,591
2 votes
1 answer
106 views

Is it possible to automate testing user input? An example of this could be multiple editing operations, undo, saving, reverting the buffer etc. Then checking the buffer contents is what the test ...
ideasman42's user avatar
  • 9,513
1 vote
1 answer
303 views

I am testing an Emacs package on Travis CI with ert. A PR now requires the s package. This is how I currently make sure it's available in the test environment: script: - $EMACS --version - $EMACS ...
Tamas Papp's user avatar
0 votes
1 answer
117 views

What I'm doing: If I define a test like: (ert-deftest tmp-test () "failing test" :expected-result :failed (should (eql (+ 1 0) 2))) and then I run M-x ert-run-tests-automatically ;; ...
user1854496's user avatar
-1 votes
1 answer
72 views

In a ruby/rails project, the "standard" way to run "the test suite" is rake # alias for rake test Some projects will mention (when there's a deviation)how to run tests in their README. How do you ...
american-ninja-warrior's user avatar
0 votes
1 answer
259 views

I'm trying to figure out how I can use ERT and libraries like el-mock to test simple functions that manipulate my org-document. Consider a function like this: (defun promote-next-heading () (org-...
Beetle B.'s user avatar
  • 720
0 votes
0 answers
160 views

Elpy has support for running test using your test runner. Looking at anaconda it does not seem to do the same functionality is there a package that can detect all your tests and let you run them ...
Oly's user avatar
  • 603
5 votes
1 answer
2k views

I try to debug my pytest-cases like this: import pytest def test_something() ... ... pytest.set_trace() Then, i execute the tests by running elpy-test. The test starts to run and stops ...
Markus's user avatar
  • 481
0 votes
1 answer
219 views

I'm following an entry-level tutorial on rspec here, and I've created a very simple test at spec\lib\zombie_spec.rb: require "spec_helper" describe "A Zombie" do #Your 'examples' (tests) go here. ...
achalk's user avatar
  • 589
1 vote
1 answer
222 views

I have written a few simple tests, when I run them on the buffer inside emacs everything passes. However, when I run them in batch mode as shown below, it fails. What can explain this? emacs -batch -...
Oly's user avatar
  • 603
4 votes
1 answer
406 views

I'd like to patch some elisp functions inside my unit tests. I've tried cl-labels and cl-flet, but neither achieve the result I want: (defun return-number () 1) (defun calls-return-number () (...
Wilfred Hughes's user avatar
0 votes
0 answers
76 views

What is the practice of mutation testing in Emacs Lisp? Source file in question is haskell-indentation.el with test suite in haskell-indentation-tests.el There are quite some strings in haskell-...
Gracjan Polak's user avatar
3 votes
0 answers
70 views

I'm trying to find a way to implement ERT tests for performance of some elisp code. For that to work I need to have a stable performance metric. Is there a stable performance metric I could use? It ...
Gracjan Polak's user avatar
7 votes
2 answers
1k views

In Cider, I can use C-c , to run the tests for the current namespace. This will work whether I'm currently in the source namespace or the test namespace itself (and indeed, this magic behavior is ...
Sam Estep's user avatar
  • 469
1 vote
2 answers
150 views

I have experimented with emacs' various shells (term in combination with compilation-mode in particular), and have had performance problems. For that reason I still use a separate terminal (e.g. ...
Croad Langshan's user avatar
2 votes
1 answer
353 views

Newbie question here. In intellij there is Ctrl-Shift T to go to the corresponding test file. (For java at least.) I would like something similar in emacs. Something like this: For a language (or ...
froderik's user avatar
  • 155
0 votes
2 answers
209 views

I have a set of tests that involve loading files from the file-system and I would like to use the current filename to locate the test files relative to the test file. The below code shows the pattern ...
rneatherway's user avatar
2 votes
2 answers
142 views

I'm currently starting to build a package the TDD way, and for that I'm using ert, following ert-runner opinions. I would like to write a set of pending tests, to identify what I have I to test, ...
AdrieanKhisbe's user avatar
4 votes
1 answer
417 views

Say I have a function that is called on an idle timer: (defun tmp:create () (mkdir "test")) (run-with-idle-time 3 nil #'tmp:create) How can I test that this function works? Using something like (...
Sean Allred's user avatar
  • 7,111
2 votes
2 answers
286 views

Say I have two tests: (defun func-one () nil) (defun func-two () (and (func-one) t)) (ert-deftest test-one () "Test basic functionality" (should (func-one))) (ert-deftest test-two () "Test ...
Sean Allred's user avatar
  • 7,111
4 votes
2 answers
845 views

While it is easy to run the whole test suite with projectile-rails, this takes too much time. I'd like to be able to run the current test (i.e., the test point is located in) with a shortcut. Is this ...
ckruse's user avatar
  • 467
2 votes
1 answer
170 views

I'm trying to use ERT to test the ycmd package, and part of what I need to do is pass bodies of code to the ycmd server and ask for completion candidates. I'd like to be able to keep these bodies of ...
abingham's user avatar
  • 927
5 votes
3 answers
1k views

Is there a way, via cider or some other emacs extension, to run all of the tests in a leiningen project? cider has the function cider-test-run-tests which attempts to just run the tests related to ...
abingham's user avatar
  • 927