The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
8 views

unit testing form validation using simpletest module

i am using simpletest module for functional and unit testing. Can any help me with writing tests for custom forms hook_enable and hook_disable
0
votes
0answers
18 views

finding difficulty in Writing test methods for my custom module [on hold]

i have created multi step form submission module . i have to run automated test for it. i am using simple test module. i have understood writing functionality test and unit test. But i am not getting ...
3
votes
1answer
35 views

How to test Drupal distributions and see examples

Is there a way to see Drupal distributions already installed for testing as demo sites? I was searching drupal.org, where I only found 'case studies'. Sites there are sorted only by categories, not by ...
0
votes
0answers
16 views

Unit testing on windows

I hope this question is not very naive, the problem is that in Drupal 8 there are several unit tests written for modules and I want to test them. But since I am on windows os I am not able to figure ...
0
votes
1answer
24 views

Functional testing without using simpletest

I have recently joined a Drupal project at work that is approx 50% finished. Functional testing was never part of the project. The site has about 8 custom modules and they are not going to be used ...
0
votes
0answers
26 views

Fatal Error while sending a multipart POST request to a image upload created using Field API

While testing a site i created using "Acunetix" web vulnerability scanner, it posted a multipart request to a image upload field created using Field API. The test manipulated a POST statement and ...
0
votes
2answers
31 views

Is there an efficient easy way to test Drupal code while developing it?

While writing code making sure, for example, I'm access the correct array property I keep refreshing the browser.(Or, that I didn't make a semantic mistake like that last sentence but in code) Is ...
4
votes
1answer
26 views

How do I re-queue a test that has been postponed on Drupal.org?

I'm trying to run the tests on a patch on Drupal.org. The relevant issue is here. The status is marked as Test request sent but more than a week has passed and the test hasn't been run. I tried ...
0
votes
0answers
30 views

Can you execute Simpletest on a specific folder (i.e. a folder of custom modules)?

Is there a way to execute Simpletest on a specific folder (i.e. a folder of custom modules)? or are you forced to either execute all of them or specify all of the "groups"? I noticed that in there ...
0
votes
1answer
84 views

How to log in to Drupal 7 website with jmeter

I am trying to set up an load test using jmeter. As part of the test I want to be able to log in as the site administrator and then go to admin page. For some reason the test is not able to login as ...
3
votes
1answer
140 views

How to bypass CAPTCHA during Behat functional testing?

We have a site that uses the CAPTCHA and CAPTCHA After modules to protect forms from invalid submissions. We're doing some functional and BDD testing using Behat and the tests are sometimes triggering ...
1
vote
0answers
9 views

Understanding Pantheon Workflows and Best Practices for Deployment to an Active Site [duplicate]

I've currently moved an active user site over to Pantheon. It's structured and themed extensively using Panels Everywhere, Panels, Views, and Display Suite. What I would love to do now, is on the ...
1
vote
2answers
73 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
vote
2answers
52 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
36 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? ...
2
votes
2answers
92 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
45 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
1answer
30 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 ...
3
votes
1answer
2k 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
59 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
1answer
123 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
112 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
334 views

Disable lock_release_all

I am testing my module, using a custom SQLite database. It has minimal amount of tables, necessary for the module. I run this function. function test_header(&$modules, &$path_var = null) { ...
0
votes
1answer
749 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
48 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
75 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
38 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
223 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
323 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
60 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 ...
2
votes
3answers
445 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
193 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
156 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
129 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
219 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
103 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
123 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
175 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
282 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
79 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
165 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
57 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
110 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, ...
13
votes
1answer
144 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
240 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: ...
6
votes
1answer
3k 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
312 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
292 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
773 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 : ...