The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
18 views

Writing functional tests for a controller that makes call to external service?

I'm working on the D8 version of the CAS module. To integrate with a single sign on CAS server, this module will have to redirect the user to the CAS server often, and occasionally make cURL requests ...
-1
votes
1answer
15 views

Easy way to test 1000's of pages on Drupal 7 for errors?

What are some automated testing tools for Drupal 7 where I can spider through all the dynamically generated and regular nodes of my site to test for php errors? I just updated to php 5.5 and i saw a ...
1
vote
2answers
31 views

Is there a way to load the content types using DrupalWebTestCase?

I'm trying to learn how to do testing in Drupal. I'm pretty new with it so maybe i didn't got it right. well, I'm trying to test some views of content types, but to test those views i need to have ...
1
vote
1answer
19 views

Can I use Simpletest to test site upgrades?

Going through upgrades it's often a bit tedious to test site functionality such as creating and editing nodes. Can Simpletest perform this kind of functionality? Or do I need a solution like Selenium? ...
0
votes
0answers
10 views

SimpleTestClone access to the real $conf array

So for a caching module im trying to write some simpletests using simpletest clone module, and i want to have access to the variables i set in settings.php like: $conf['cache_class_cache_form'] = ...
2
votes
2answers
64 views

How do I post a node that has its created field set to the past in a test class?

I am creating a test class using the framework of the core Testing module for a module that is supposed to autoexpire nodes some time after they've been created. Nodes have two timestamp fields: ...
0
votes
1answer
31 views

Easy database reconfiguration for migration [duplicate]

I have build a Drupal site on my local development server and I am preparing to move it to my test server and eventually my live server. I know where to find the database settings in my settings.php ...
0
votes
0answers
155 views

Drupal 7 behat, context class not found

I am trying to set up the behat to work with drupal 7. After following all instructions for installing behat_testing I am getting when I attempt to run it: [RuntimeException] ...
-1
votes
1answer
23 views

Why are no tests shown on testing overview? [closed]

I want to run DrupalWebTestCases on my custom Drupal 7 module. Following the Tutorial at https://drupal.org/simpletest-tutorial-drupal7 i'm stuck at running the tests: also after cache deletion no ...
2
votes
1answer
321 views

Security testing a new site

I'm about to relaunch my company's website using Drupal 7. I'm the sole web engineer in our IT department, so I have a lot on my plate as we approach the launch date. As this is my first major Drupal ...
0
votes
1answer
37 views

Core Testing vs SimpleTest

I have a query concerning the core Testing module and the SimpleTest module. When I install a new site, the Testing module is available but disabled. When enabled, a list of tests are available for a ...
0
votes
0answers
16 views

How to test commerce_sp end dates (subscription product)

Is there an easy way to test commerce_sp end date rules? The lowest I can get the time period is 1 week, which is not helpful when tweaking "supscription end" rules by trial and error. Is there a ...
0
votes
1answer
75 views

How to tell travis that test is failed?

I am trying to integrate travis test bots to my module. Travis can run the test correctly, in console log, I can see drush run-test discover pass and fail assertions, but the final result is still ...
0
votes
1answer
68 views

How to sort drush status messages in test scripts?

I'm using drush to run test scripts agains my drupal 7 installation. Simply calling: $ drush scr path/to/myScript.php My script is using drupal_set_message() to output status of my test scripts. ...
0
votes
1answer
196 views

Disable lock_release_all

I am testing my module, using a custom SQLite database. It has minnimal amount of tables, necessary for the module. I run this function. function test_header(&$modules, &$path_var = null) { ...
0
votes
1answer
397 views

drush status not showing correct setting from alias file

I'm trying to get drush to work with my test environment, which is actually using a separate database. so here's my alias in aliases.drushrc.php: $aliases['local'] = array( 'root' => ...
1
vote
0answers
40 views

How to create database for testing

I'm implementing http://phactory.org/ to get away from the heavier aspects of test data creation. One of the prerequisite items for this is to start with an empty database, with proper schema. I ...
1
vote
0answers
63 views

Staging / testing environment [closed]

I've started a big project and need to create some kind of staging area or testing environment, where I'm able to start off with developing the site and after launch will be able to use as the server ...
0
votes
2answers
34 views

How can I easily verify if a core or module update has not broken anything?

When I update drupal core or even a couple of modules, I'm always afraid if something breaks. What easy way is there to test a site if anything has broken? Its not feasible for me to test a site that ...
0
votes
3answers
141 views

How to test if user is denied access when her role has no “access content”

Wanting to test that only users with "access content" have access: public function testOnlyAccessContentAccessible() { $web_user = $this->drupalCreateUser(); $this->drupalLogin($web_user); ...
0
votes
1answer
244 views

How do I run unit tests against datasets? (DrupalWebTestCase and DrupalTestCase)

I am testing a module that I am writing against the Unit Testing framework that comes with Drupal 7. All makes sense, and everything asserts as it should. My question though, is it possible to run ...
1
vote
0answers
47 views

Press 'continue' button in simpletest

I am trying to enable modules via POSTing to /admin/modules in a simpletest. It works fine, except that there are dependencies (the whole reason I want to do it this way) and when it requires then ...
0
votes
2answers
287 views

Simpletest fails to create the field_config table

I'm only just getting into TDD with Drupal and unfortunately run into trouble right away. For some reason the simpletest####field_config table isn't being created, and I don't get why; many other ...
3
votes
1answer
163 views

Automated testing module for entire site

I'm looking for a module which will test an entire site each an OS update, or a Drupal core update. E.g. go through each node and let me know there are any 404 returned for JS or CSS files, broken ...
0
votes
0answers
17 views

Is there a way to test or spoof different user access? [duplicate]

Possible Duplicate: Multi-user/role testing, best practices My current style in testing different user access is opening a different browser or opening a private session and logging into a ...
0
votes
1answer
96 views

Why is my alias “NULL” in a test?

I am using Drupal 7, I have Pathauto enabled, and my user has permissions to create new aliases. When I manually create a node, uncheck the checkbox for automatic alias generation, and enter a custom ...
2
votes
1answer
86 views

Version numbers of dependencies in testing

If I'm submitting a test to the qa.drupal.org testbot, and my module requires a dev version of another module in order to function properly, is it adequate to declare the version in my module's .info ...
0
votes
1answer
173 views

Is there a clean-URL-reflective version of file_create_url()?

I have a site with clean URLs enabled and in a test I've written, I compare the current drupalGetHeader('location') to file_create_url($file->uri). The tests passes on my site, but on the ...
0
votes
1answer
78 views

Does DrupalWebTestCase::drupalGet() use the permissions of DrupalWebTestCase::$loggedInUser?

I'm trying to test the permissions of a particular role, and this code: $this->drupalLogin($this->editor_user); $this->drupalGet($node->path['source']); returns a 200 (OK) status, when ...
2
votes
1answer
97 views

Programmatically save altered file

As I mentioned in my previous question I'm attempting to write tests for a patch that will, ideally, trigger the creation of a redirect if the URI of a file changes. My patch uses hook_file_update() ...
0
votes
0answers
135 views

Media module, file usage, and simpletest

I'm trying to write a test that will do the following: Create a user Create an 'article' node Upload a file via Media module Insert that file into the body via pre-determined markup Save the node ...
4
votes
2answers
218 views

Write Drupal Code online

Is there any website that allows to write and test Drupal Code online ? Like this one for PHP writecodeonline.
0
votes
1answer
62 views

Why is my patch failing a test?

When a patch fails testing because it doesn't apply, and the error reads "Ensure the patch applies to the tip of the chosen code-base." what does this mean?
4
votes
1answer
147 views

Invoking Drupal core tests from within a custom module .test script

I am writing a simpletest test script, where I would like to enable my module, and then invoke a Drupal core test to ensure that my module is producing core-compliant results (in particular, I render ...
1
vote
1answer
52 views

$user->uid is always 1 when running automated tests

In my automated tests, I create some users. debug('moderator_user: '.$this->moderator_user->uid); debug('editor_user: '.$this->editor_user->uid); outputs 'moderator_user: 2' ...
0
votes
2answers
101 views

How to do load testing that simulate adding a node with a drupal site?

I know we can use apaceh workbench to do some load testing and provide some statistics. However, how would I go about finding out how many logged in users can perform certain action (adding a node, ...
12
votes
1answer
140 views

Can a database be tested to see if it is inconsistent?

We all know that Drupal doesn't really support the concept of foreign keys in the database, and likely never will1. We also know that it is possible for modules to not do the right thing, or that ...
2
votes
1answer
172 views

Drupal testing with DrupalGetAJAX

I'm working on writing some automated tests for an AJAX API, and getting strange results. If I directly view the page, I see the following output, sent by drupal_json_output: ...
5
votes
1answer
2k views

How to test if honeypot is working on a form?

I have applied the Honeypot module to my site and set it to protect all forms on the site. The problem is I am unsure of how to test it to know that it is working as expected. Can anyone tell me how ...
0
votes
2answers
238 views

Why DrupalWebTestCase processing took so long?

I want to create a test that uses the database, so I must use the DrupaWebTestCase class. I create the following test class with this simple test: class MyModuleTest extends DrupalWebTestCase { ...
0
votes
1answer
224 views

Create a simpletest test to add additional form elements using the “Add another item” button

I am trying to create a test case for my custom module using simpletest in Drupal7. I want to create a node. The problem is that the node edit form contains a number of fields which can have ...
0
votes
1answer
582 views

“Failed to set field” Problem with SimpleTest, testing a form

With SimpleTests, I want to test a form similar to : // Textfield : $form['fieldset_name']['test'] = array( '#type' => 'textfield', ... ); // Submit : ...
1
vote
2answers
351 views

using DrupalWebTestCase - any trick to prevent it from running from scratch each time?

It makes sense to run each test in a completely clean environment. However, before tests can be run, they have to be developed, during this process it is so frustrating to have to wait 3 or 4 minutes ...
1
vote
5answers
4k views

How can I disable all outgoing emails from a site all at once?

There are some automated outgoing emails from my Drupal site like by core system mail, ubercart, webform and Rules. The reason is that I also have a test site which is exactly the copy of the ...
0
votes
3answers
319 views

How can I automatically restore my site from a backup using the command line for testing purposes?

I am on Mac OS X using MAMP PRO as my local development environment. I want to quickly reset my site to a known state in order to run some tests I have prepared in Selenium. I have the Backup and ...
1
vote
2answers
225 views

Should a fresh install of Drupal have failing tests and what to do with the failing tests?

I'm delving into the world of SimpleTest in Drupal. I started off by doing a fresh installation of Drupal 7 and running all the tests. I noticed there are a few tests that are failing, along with 1 ...
4
votes
2answers
488 views

Testing Email locally? Could i reroute email to watchdog?

I'm trying to debug how an email invoice looks in ubercart locally. Mail is not configured on my local machine (ubuntu 11.10). I really would prefer to debug this locally without sending nagging ...
4
votes
2answers
3k views

How to load module include files in .test file?

I'm trying to update the Drupal 7 version of the password_policy.test file that is included with the Password Policy module. When I run the tests, I'm getting "Fatal error: Call to undefined function ...
3
votes
1answer
451 views

How to SimpleTest a module's use of drupal_alter() or module_invoke_all()?

I'm developing a custom module. My module calls drupal_alter() with a $type unique to my module, so other modules can alter the behavior of my module. I'd like to write a SimpleTest for my module, ...
6
votes
1answer
107 views

Best practice when testing module updates

A problem I face on a regular basis is trying to test sites that have recently had a lot of module updates. My usual process is to take each module on a case by case basis and test site features ...